This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
ARM build fixes
- From: Daniel Jacobowitz <drow at false dot org>
- To: libc-alpha at sources dot redhat dot com
- Date: Fri, 13 Aug 2004 12:22:12 -0400
- Subject: ARM build fixes
These two patches let me build glibc on ARM using GCC 3.4. The
mcount_internal change is obvious. The output-format.sed change handles the
fact that arm-linux-gcc does not explicitly pass -EL to the linker. The
documentation for OUTPUT_FORMAT(a,b,c) says that b is used with -EB, c with
-EL, and a otherwise; so this patch picks a if neither -EL nor -EB was seen.
--
Daniel Jacobowitz
2004-08-13 Daniel Jacobowitz <dan@debian.org>
* scripts/output-format.sed: Handle default case of three-argument
OUTPUT_FORMAT.
* sysdeps/arm/machine-gmon.h (mcount_internal): Mark as
__attribute_used__.
Index: scripts/output-format.sed
===================================================================
RCS file: /big/fsf/rsync/glibc-cvs/libc/scripts/output-format.sed,v
retrieving revision 1.2
diff -u -p -r1.2 output-format.sed
--- scripts/output-format.sed 8 Dec 2002 08:13:16 -0000 1.2
+++ scripts/output-format.sed 12 Aug 2004 20:52:07 -0000
@@ -7,7 +7,7 @@ t o
: o
s/^.*OUTPUT_FORMAT(\([^,]*\), \1, \1).*$/OUTPUT_FORMAT(\1)/
t q
-s/^.*OUTPUT_FORMAT(\([^,]*\), \([^,]*\), \([^,]*\)).*$/\2,\3/
+s/^.*OUTPUT_FORMAT(\([^,]*\), \([^,]*\), \([^,]*\)).*$/\1,\2,\3/
t s
s/^.*OUTPUT_FORMAT(\([^,)]*\).*$)/OUTPUT_FORMAT(\1)/
t q
@@ -16,8 +16,9 @@ d
s/"//g
G
s/\n//
-s/^\([^,]*\),\([^,]*\),B/OUTPUT_FORMAT(\1)/p
-s/^\([^,]*\),\([^,]*\),L/OUTPUT_FORMAT(\2)/p
+s/^\([^,]*\),\([^,]*\),\([^,]*\),B/OUTPUT_FORMAT(\2)/p
+s/^\([^,]*\),\([^,]*\),\([^,]*\),L/OUTPUT_FORMAT(\3)/p
+s/^\([^,]*\),\([^,]*\),\([^,]*\)/OUTPUT_FORMAT(\1)/p
/,/s|^|*** BUG in libc/scripts/output-format.sed *** |p
q
: q
Index: sysdeps/arm/machine-gmon.h
===================================================================
RCS file: /big/fsf/rsync/glibc-cvs/libc/sysdeps/arm/machine-gmon.h,v
retrieving revision 1.4
diff -u -p -r1.4 machine-gmon.h
--- sysdeps/arm/machine-gmon.h 6 Jul 2001 04:55:48 -0000 1.4
+++ sysdeps/arm/machine-gmon.h 12 Aug 2004 15:14:14 -0000
@@ -32,7 +32,7 @@ void _mcount (void);
weak_alias (_mcount, mcount)
#endif
-static void mcount_internal (u_long frompc, u_long selfpc);
+static void mcount_internal (u_long frompc, u_long selfpc) __attribute_used__;
#define _MCOUNT_DECL(frompc, selfpc) \
static void mcount_internal (u_long frompc, u_long selfpc)