Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 293637 | Differences between
and this patch

Collapse All | Expand All

(-)a/Makeconfig (-5 / +5 lines)
Lines 447-457 Link Here
447
	     $(common-objpfx)libc% $(+postinit),$^) \
447
	     $(common-objpfx)libc% $(+postinit),$^) \
448
	     $(link-extra-libs) $(link-libc) $(+postctorS) $(+postinit)
448
	     $(link-extra-libs) $(link-libc) $(+postctorS) $(+postinit)
449
endif
449
endif
450
+link = $(+link-pie)
450
# Command for statically linking programs with the C library.
451
# Command for statically linking programs with the C library.
451
ifndef +link-static
452
ifndef +link-static
452
+link-static = $(CC) -nostdlib -nostartfiles -static -o $@ \
453
+link-static = $(CC) -nostdlib -nostartfiles -static -o $@ \
453
	      $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F))  \
454
	      $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F))  \
454
	      $(addprefix $(csu-objpfx),$(static-start-installed-name)) \
455
	      $(addprefix $(csu-objpfx),S$(static-start-installed-name)) \
455
	      $(+preinit) $(+prector) \
456
	      $(+preinit) $(+prector) \
456
	      $(filter-out $(addprefix $(csu-objpfx),start.o \
457
	      $(filter-out $(addprefix $(csu-objpfx),start.o \
457
						     $(start-installed-name))\
458
						     $(start-installed-name))\
Lines 549-559 Link Here
549
ifeq ($(elf),yes)
550
ifeq ($(elf),yes)
550
+preinit = $(addprefix $(csu-objpfx),crti.o)
551
+preinit = $(addprefix $(csu-objpfx),crti.o)
551
+postinit = $(addprefix $(csu-objpfx),crtn.o)
552
+postinit = $(addprefix $(csu-objpfx),crtn.o)
552
+prector = `$(CC) --print-file-name=crtbegin.o`
553
+postctor = `$(CC) --print-file-name=crtend.o`
554
# Variants of the two previous definitions for linking PIE programs.
555
+prectorS = `$(CC) --print-file-name=crtbeginS.o`
553
+prectorS = `$(CC) --print-file-name=crtbeginS.o`
556
+postctorS = `$(CC) --print-file-name=crtendS.o`
554
+postctorS = `$(CC) --print-file-name=crtendS.o`
555
+prector = $(+prectorS)
556
+postctor = $(+postctorS)
557
+interp = $(addprefix $(elf-objpfx),interp.os)
557
+interp = $(addprefix $(elf-objpfx),interp.os)
558
endif
558
endif
559
csu-objpfx = $(common-objpfx)csu/
559
csu-objpfx = $(common-objpfx)csu/
Lines 683-689 Link Here
683
# the implicit -lang-asm and breaks cpp behavior for .S files--notably
683
# the implicit -lang-asm and breaks cpp behavior for .S files--notably
684
# it causes cpp to stop predefining __ASSEMBLER__.
684
# it causes cpp to stop predefining __ASSEMBLER__.
685
CPPFLAGS = $($(subdir)-CPPFLAGS) $(+includes) $(defines) \
685
CPPFLAGS = $($(subdir)-CPPFLAGS) $(+includes) $(defines) \
686
	   -include $(..)include/libc-symbols.h $(sysdep-CPPFLAGS) \
686
	   -include $(..)include/libc-symbols.h -DPIC $(sysdep-CPPFLAGS) \
687
	   $(CPPFLAGS-$(suffix $@)) \
687
	   $(CPPFLAGS-$(suffix $@)) \
688
	   $(foreach lib,$(libof-$(basename $(@F))) \
688
	   $(foreach lib,$(libof-$(basename $(@F))) \
689
		         $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
689
		         $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
(-)debug/Makefile (+3 lines)
Lines 85-90 Link Here
85
CFLAGS-tst-longjmp_chk2.c = -fexceptions -fasynchronous-unwind-tables \
85
CFLAGS-tst-longjmp_chk2.c = -fexceptions -fasynchronous-unwind-tables \
86
			    -D_FORTIFY_SOURCE=1
86
			    -D_FORTIFY_SOURCE=1
87
87
88
# Don't build ____longjmp_chk.o with -DPIC #293637
89
CPPFLAGS-____longjmp_chk.o = -UPIC
90
88
# We know these tests have problems with format strings, this is what
91
# We know these tests have problems with format strings, this is what
89
# we are testing.  Disable that warning.
92
# we are testing.  Disable that warning.
90
CFLAGS-tst-chk1.c = -Wno-format
93
CFLAGS-tst-chk1.c = -Wno-format

Return to bug 293637