public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
* Reset the LDFLAGS and building helper executables
@ 2016-06-27 20:08 Laurent Bigonville
  2016-06-27 23:10 ` Reset the LDFLAGS when " Laurent Bigonville
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent Bigonville @ 2016-06-27 20:08 UTC (permalink / raw)
  To: linux-audit@redhat.com

Hello,

When enabling the hardening flags on debian (adding bindnow and PIE) I 
get the following message:

gcc -DHAVE_CONFIG_H -I. -I../../../lib -I..  -I. -I../../.. 
-I../../../auparse  '-DTABLE_H="actiontab.h"' -g -O2 -c -o 
gen_actiontabs_h-gen_tables.o `test -f 'gen_tables.c' || echo 
'../../../lib/'`gen_tables.c
/bin/bash ../libtool  --tag=CC   --mode=link gcc 
'-DTABLE_H="actiontab.h"' -g -O2  -fPIE -pie -Wl,-z,relro -Wl,-z,now 
-Wl,--as-needed -o gen_actiontabs_h gen_actiontabs_h-gen_tables.o
libtool: link: gcc -DTABLE_H=\"actiontab.h\" -g -O2 -fPIE -pie -Wl,-z 
-Wl,relro -Wl,-z -Wl,now -Wl,--as-needed -o gen_actiontabs_h 
gen_actiontabs_h-gen_tables.o
/usr/bin/ld: gen_actiontabs_h-gen_tables.o: relocation R_X86_64_32 
against `.rodata.str1.1' can not be used when making a shared object; 
recompile with -fPIC
gen_actiontabs_h-gen_tables.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

Looking that build system, it seems that CFLAGS and CPPFLAGS for these 
executables are overriden in lib/Makefile.am and auparse/Makefile.am 
(with CFLAGS_FOR_BUILD and CPPFLAGS_FOR_BUILD) but the LDFLAGS are left 
untouched.

Shouldn't the LDFLAGS also be reset when building these executables?

Regards,

Laurent Bigonville

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-28 20:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-27 20:08 Reset the LDFLAGS and building helper executables Laurent Bigonville
2016-06-27 23:10 ` Reset the LDFLAGS when " Laurent Bigonville
2016-06-28 20:44   ` Steve Grubb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox