This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] BZ #14544: Use crtbeginT.o to statically link programs


On Mon, Sep 24, 2012 at 11:02 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Mon, Sep 24, 2012 at 10:59 AM, Mike Frysinger <vapier@gentoo.org> wrote:
>> On Monday 24 September 2012 13:53:01 H.J. Lu wrote:
>>> On Mon, Sep 24, 2012 at 10:49 AM, Mike Frysinger wrote:
>>> > On Monday 24 September 2012 13:23:31 H.J. Lu wrote:
>>> >> On Mon, Sep 24, 2012 at 10:21 AM, Mike Frysinger wrote:
>>> >> > On Tuesday 04 September 2012 22:58:13 H.J. Lu wrote:
>>> >> >> We should use crtbeginT.o instead of crtbegin.o to statically link
>>> >> >> programs.  Tested on Linux/x86-64.  OK to install?
>>> >> >
>>> >> > unfortunately, ia64 doesn't have crtbeginT, and afaict, never has.
>>> >> > how do we handle that ?
>>> >>
>>> >> Can ia64 override +prectorT?
>>> >
>>> > seems like adding a ports/sysdeps/ia64/Makeconfig file which clobbers
>>> > these two vars works
>>>
>>> Do you need to clobber both? I thought  +prectorT was sufficient.
>>
>> when i said "crtbeginT", i really meant "crtbeginT and crtendT"
>> -mike
>
> I don't believe there is crtendT for any targets.
>

However, we should use crtend.o for static executables.  I am
testing this as an obvious fix.


-- 
H.J.
--
diff --git a/Makeconfig b/Makeconfig
index 8d4f7b4..42b836e 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -581,7 +581,7 @@ endif
 +postctorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtendS.o`
 # Variants of the two previous definitions for statically linking programs.
 +prectorT = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbeginT.o`
-+postctorT = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtendS.o`
++postctorT = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtend.o`
 +interp = $(addprefix $(elf-objpfx),interp.os)
 csu-objpfx = $(common-objpfx)csu/
 elf-objpfx = $(common-objpfx)elf/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]