Hi All,

I'm interested in trying to figure out how to "cleanly" set options
for CFLAGS (and CXXFLAGS) and LDFLAGS. I also want it to intelligently
apply to programs and shared objects. The problem I am having is
programs need:

  CFLAGS += -fPIE
  LDFLAGS += -pie

while shared objects need:

  CFLAGS += -fPIC
  LDFLAGS += -shared

So I can't run configure to set up a project properly:

$ configure CFLAGS="-Wall -Wextra -Wconversion -fPIE -pie
    -Wno-unused-parameter -Wformat=2 -Wformat-security
    -fstack-protector-all -Wstrict-overflow
    -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now"

I see others have also felt the same discomfort
(http://lists.fedoraproject.org/pipermail/devel-announce/2011-August/000821.html):

    "All of this is only an issue because most build systems don't
    let you say different CFLAGS or LDFLAGS for shared libraries
    and executables.  Sigh."

Any ideas?

Jeff

_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to