This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH] Fix libgloss build issue for bfin
- From: Jie Zhang <jie dot zhang at analog dot com>
- To: newlib at sourceware dot org
- Date: Wed, 23 Sep 2009 12:55:40 +0800
- Subject: [PATCH] Fix libgloss build issue for bfin
I lost some changes when I sent out bfin patches. libsim and some start
files fail to build for the default multilib. This patch fixes it.
Please review and commit. Thanks.
Another question is the make did not stop for this error. So I did not
catch it when I just built it. I found this error when I was doing gcc
testing and found gcc cannot find -lsim. I built libgloss and newlib in
the gcc tree.
Regards,
Jie
2009-09-23 Jie Zhang <jie.zhang@analog.com>
* bfin/Makefile.in (basiccrt.o, basiccrts.o): Use
-mcpu=bf532-any for the default multilib.
Index: bfin/Makefile.in
===================================================================
RCS file: /cvs/src/src/libgloss/bfin/Makefile.in,v
retrieving revision 1.4
diff -u -r1.4 Makefile.in
--- bfin/Makefile.in 16 Sep 2009 15:59:40 -0000 1.4
+++ bfin/Makefile.in 23 Sep 2009 04:48:24 -0000
@@ -99,10 +99,18 @@
crt0.o: crt0.S
basiccrt.o: basiccrt.S
+ifeq (,$(findstring mcpu=,$(CFLAGS)))
+ $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -mcpu=bf532-any -o $@ -c $<
+else
$(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -o $@ -c $<
+endif
basiccrts.o: basiccrt.S
+ifeq (,$(findstring mcpu=,$(CFLAGS)))
+ $(CC) -D__BFIN_SDRAM $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -mcpu=bf532-any -o $@ -c $<
+else
$(CC) -D__BFIN_SDRAM $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -o $@ -c $<
+endif
basiccrt561.o: basiccrt.S
ifneq (,$(findstring mcpu=bf532-none,$(CFLAGS)))