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]

[PATCH] Fix 32-bit sparc build.


Something (outside of the elf merge changes themselves) changed
between when I originally tested Andreas's elf merge changes and when
the merge got fixed up last night.

What happens is that sparc32/sparcv9/Makefile gets evaluated before
sparc32/Makefile and the latter does a direct assignment of
ASFLAGS-.os blowing away the assembler setting we made in the former.

This whole scheme is error prone, just fix this up to add the -fPIC
thing to ASFLAGS-.os at the topmost sparc sysdep Makefile but with a
"+=" instead of a plain assignment.  This way no matter what the
evaluation order, no flags can get lost.

Committed to master.

	* sysdeps/sparc/Makefile: Add -fPIC to ASFLAGS-.os here....
	* sysdeps/sparc/sparc32/Makefile: rather than here...
	* sysdeps/sparc/sparc64/Makefile: and here.
---
 ChangeLog                      |    6 ++++++
 sysdeps/sparc/Makefile         |    3 +++
 sysdeps/sparc/sparc32/Makefile |    3 ---
 sysdeps/sparc/sparc64/Makefile |    3 ---
 4 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 03b7795..9069eb3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-03-28  David S. Miller  <davem@davemloft.net>
+
+	* sysdeps/sparc/Makefile: Add -fPIC to ASFLAGS-.os here....
+	* sysdeps/sparc/sparc32/Makefile: rather than here...
+	* sysdeps/sparc/sparc64/Makefile: and here.
+
 2012-03-28  Ulrich Drepper  <drepper@gmail.com>
 
 	* malloc/mallocbug.c: Avoid warnings about unused variables.
diff --git a/sysdeps/sparc/Makefile b/sysdeps/sparc/Makefile
index 1dd70e8..3f0c096 100644
--- a/sysdeps/sparc/Makefile
+++ b/sysdeps/sparc/Makefile
@@ -15,3 +15,6 @@ ifeq ($(subdir),csu)
 CPPFLAGS-crti.S += -fPIC
 CPPFLAGS-crtn.S += -fPIC
 endif
+
+# The assembler on SPARC needs the -fPIC flag even when it's assembler code.
+ASFLAGS-.os += -fPIC
diff --git a/sysdeps/sparc/sparc32/Makefile b/sysdeps/sparc/sparc32/Makefile
index 9cb518f..fb7132e 100644
--- a/sysdeps/sparc/sparc32/Makefile
+++ b/sysdeps/sparc/sparc32/Makefile
@@ -47,6 +47,3 @@ $(divrem:%=$(sysdep_dir)/sparc/sparc32/%.S): $(sysdep_dir)/sparc/sparc32/divrem.
 	mv -f $@-tmp $@
 
 sysdep-realclean := $(sysdep-realclean) $(divrem:%=sysdeps/sparc/sparc32/%.S)
-
-# The assembler on SPARC needs the -fPIC flag even when it's assembler code.
-ASFLAGS-.os = -fPIC
diff --git a/sysdeps/sparc/sparc64/Makefile b/sysdeps/sparc/sparc64/Makefile
index fb00032..2b7b830 100644
--- a/sysdeps/sparc/sparc64/Makefile
+++ b/sysdeps/sparc/sparc64/Makefile
@@ -7,9 +7,6 @@ ifeq ($(subdir),string)
 sysdep_routines += align-cpy
 endif
 
-# The assembler on SPARC needs the -fPIC flag even when it's assembler code.
-ASFLAGS-.os = -fPIC
-
 ifeq ($(have-as-vis3),yes)
 ASFLAGS-.o += -Wa,-Av9d
 ASFLAGS-.os += -Wa,-Av9d
-- 
1.7.9.1



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