]>
Commit | Line | Data |
---|---|---|
3994dee1 | 1 | 2012-11-11 Magnus Granberg <zorry@gentoo.org> |
bceb6c91 | 2 | |
3994dee1 MT |
3 | #442712 |
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. | |
bceb6c91 | 9 | |
3994dee1 MT |
10 | --- libc/Makeconfig |
11 | +++ libc/Makeconfig | |
bceb6c91 MT |
12 | @@ -447,11 +447,12 @@ |
13 | $(common-objpfx)libc% $(+postinit),$^) \ | |
14 | $(link-extra-libs) $(link-libc) $(+postctorS) $(+postinit) | |
15 | endif | |
16 | ++link = $(+link-pie) | |
17 | # Command for statically linking programs with the C library. | |
18 | ifndef +link-static | |
3994dee1 | 19 | +link-static-before-libc = $(CC) -nostdlib -nostartfiles -static -o $@ \ |
bceb6c91 MT |
20 | $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \ |
21 | - $(addprefix $(csu-objpfx),$(static-start-installed-name)) \ | |
22 | + $(addprefix $(csu-objpfx),S$(static-start-installed-name)) \ | |
3994dee1 | 23 | $(+preinit) $(+prectorT) \ |
bceb6c91 MT |
24 | $(filter-out $(addprefix $(csu-objpfx),start.o \ |
25 | $(start-installed-name))\ | |
26 | @@ -549,11 +550,10 @@ | |
27 | ifeq ($(elf),yes) | |
28 | +preinit = $(addprefix $(csu-objpfx),crti.o) | |
29 | +postinit = $(addprefix $(csu-objpfx),crtn.o) | |
3ae9e320 MT |
30 | -+prector = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbegin.o` |
31 | -+postctor = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtend.o` | |
bceb6c91 | 32 | -# Variants of the two previous definitions for linking PIE programs. |
3ae9e320 MT |
33 | +prectorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbeginS.o` |
34 | +postctorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtendS.o` | |
bceb6c91 MT |
35 | ++prector = $(+prectorS) |
36 | ++postctor = $(+postctorS) | |
3994dee1 MT |
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` | |
bceb6c91 MT |
40 | +interp = $(addprefix $(elf-objpfx),interp.os) |
41 | endif | |
42 | csu-objpfx = $(common-objpfx)csu/ |