This is the mail archive of the 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]

[PATCH] Add sysdep-LDFLAGS prector, postctor, et al

The following patch fixes an erroneous condition where the prector,
prectorS, postctor, and postctorS do not contain the sysdep-LDFLAGS and
therefore the wrong version of crtbegin.o (and others) may be picked up.

For me this manifest during a powerpc soft-fp build of glibc where the
prector was used to find the correct beginctr.o:

`/opt/at05/bin/gcc -m32 --print-file-name=crtbegin.o`

When it should indicate:

`/opt/at05/bin/gcc -m32 -msoft-float --print-file-name=crtbegin.o`

The result is:


Warning: /opt/at05/lib/gcc/powerpc64-linux/4.3.5/crtbegin.o uses hard
float, /home/ryanarn/glibc/stage_476/build/glibc32_ppc476/iconv/iconvconfig uses soft float

And it ends up pointing to:


When it should point to:


Ryan S. Arnold
IBM Linux Technology Center

2010-01-14  Ryan S. Arnold  <>

	* Makeconfig (+prector, +postctor, +prectorS, +postctorS): Add
	$(sysdep-LDFLAGS) to pre and post ctors so that the proper .o
	files are found by GCC.

diff --git a/Makeconfig b/Makeconfig
index 9f134cc..15cd4ca 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -549,11 +549,11 @@ endif
 ifeq ($(elf),yes)
 +preinit = $(addprefix $(csu-objpfx),crti.o)
 +postinit = $(addprefix $(csu-objpfx),crtn.o)
-+prector = `$(CC) --print-file-name=crtbegin.o`
-+postctor = `$(CC) --print-file-name=crtend.o`
++prector = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbegin.o`
++postctor = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtend.o`
 # Variants of the two previous definitions for linking PIE programs.
-+prectorS = `$(CC) --print-file-name=crtbeginS.o`
-+postctorS = `$(CC) --print-file-name=crtendS.o`
++prectorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbeginS.o`
++postctorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtendS.o`
 +interp = $(addprefix $(elf-objpfx),interp.os)
 csu-objpfx = $(common-objpfx)csu/

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