1 2012-11-11 Magnus Granberg <zorry@gentoo.org>
4 * Makeconfig (+link): Set to +link-pie.
5 (+link-static-before-libc): Change $(static-start-installed-name) to
6 S$(static-start-installed-name).
7 (+prector): Set to +prectorS.
8 (+postctor): Set to +postctorS.
13 $(common-objpfx)libc% $(+postinit),$^) \
14 $(link-extra-libs) $(link-libc) $(+postctorS) $(+postinit)
17 # Command for statically linking programs with the C library.
19 +link-static-before-libc = $(CC) -nostdlib -nostartfiles -static -o $@ \
20 $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
21 - $(addprefix $(csu-objpfx),$(static-start-installed-name)) \
22 + $(addprefix $(csu-objpfx),S$(static-start-installed-name)) \
23 $(+preinit) $(+prectorT) \
24 $(filter-out $(addprefix $(csu-objpfx),start.o \
25 $(start-installed-name))\
28 +preinit = $(addprefix $(csu-objpfx),crti.o)
29 +postinit = $(addprefix $(csu-objpfx),crtn.o)
30 -+prector = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbegin.o`
31 -+postctor = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtend.o`
32 -# Variants of the two previous definitions for linking PIE programs.
33 +prectorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbeginS.o`
34 +postctorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtendS.o`
35 ++prector = $(+prectorS)
36 ++postctor = $(+postctorS)
37 # Variants of the two previous definitions for statically linking programs.
38 +prectorT = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbeginT.o`
39 +postctorT = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtend.o`
40 +interp = $(addprefix $(elf-objpfx),interp.os)
42 csu-objpfx = $(common-objpfx)csu/