[arch-general] Howto prevent LDFLAGS --sort-common, --as-needed, <snip>, --hash-style=gnu

David C. Rankin drankinatty at suddenlinkmail.com
Tue Feb 28 10:46:29 EST 2012


Guys,

  I'm working on building kwin-style-crystal and I have patched acinclude.m4,
aclocal.m4 and configure to remove references to --as-needed, but when I run
configure, I still get the three unwanted LDFLAGS put back in the makefile
somehow? Example:

Makefile:LDFLAGS = -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu

  I just want it to read:

Makefile:LDFLAGS = -Wl,-O1,-z,relro

  What magic autotool does this and how do I fix it? The flags show up in the
Makefiles and the config.status file. I have completely searched the source code
with grep -r and after patching none of the unwanted flags are present before
starting the build. When the build craters, I check the Makefiles and
config.status and the unwanted flags are back. This results in the build failing
with:

/bin/sh ../libtool --silent --mode=link --tag=CXX g++  -march=x86-64
-mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4
-D_FORTIFY_SOURCE=2
-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -o embedtool
-L/opt/trinity/lib -L/opt/qt3/lib     -L/opt/trinity/lib/trinity embedtool.o
-lqt-mt  -lz -lpng -lz -lm -lXext -lX11  -lSM -lICE -lpthread
g++: error: unrecognized option '--sort-common'
g++: error: unrecognized option '--as-needed'
g++: error: unrecognized option '--hash-style=gnu'

  What's the trick? Thanks.

Extra info:

  For those interested, the source is:

http://www.kde-look.org/content/show.php?content=13969

  and the patch I'm applying to try and get rid of the flags is:

http://www.3111skyline.com/dl/dt/trinity/arch/src/crystal-1.patch

-- 
David C. Rankin, J.D.,P.E.


More information about the arch-general mailing list