summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nuttx/ChangeLog14
-rw-r--r--nuttx/arch/arm/src/Makefile2
-rw-r--r--nuttx/arch/avr/src/Makefile2
-rwxr-xr-xnuttx/arch/hc/src/Makefile2
-rw-r--r--nuttx/arch/mips/src/Makefile2
-rw-r--r--nuttx/arch/sh/src/Makefile2
-rw-r--r--nuttx/arch/x86/src/Makefile2
-rw-r--r--nuttx/arch/z80/src/Makefile.sdcc2
8 files changed, 17 insertions, 11 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 682cf49ef..69ac0a8a3 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -1485,7 +1485,7 @@
* arch/arm/stm32/stm32_idle.c: During idle times, the STM32 now uses the
WFI instruction to sleep in a reduced power mode until the next interrupt
- occurs (Contributed by Uros Platise).
+ occurs (Contributed by Uros Platise).
* NSH: 'mem' command renamed to 'free'. Output is now more similar to the
Linux 'free' command.
* NSH: Correct a redirection bug in NSH. The following would not work; it
@@ -1766,8 +1766,8 @@
(contributed by Uros Platise)
* arch/mips and configs/pcblogic-pic32mx: The MicroChip PIC32MX port is now
code complete and ready to begin testing. Unfortunately, it looks like
- testing will be delayed due to tool issues (My PICkit 2 will not work the
- the MPLAB debugger on PIC32; I will need to get a PICkit 3).
+ testing will be delayed due to tool issues (My PICkit 2 will not work the
+ the MPLAB debugger on PIC32; I will need to get a PICkit 3).
* drivers/net/e1000.c/h: A PCI-based E1000 Ethernet driver submitted
by Yu Qiang.
* lib/net/lib_inetaddr.c: An implementation of the inet_addr() function
@@ -2042,4 +2042,10 @@
layer).
* drivers/bch: Fixed some important bugs in the BCH driver (noted by
Li Zhuoyi (Lzyy)). This would have effected any large reads or writes
- (larger than the hardware sector size).
+ (larger than the hardware sector size).
+ * arch/*/src/Makefile: Use of -print-libgcc-file-name to get path to
+ libgcc.a may select the wrong libgcc.a if a multilib toolchain (like
+ CodeSourcery) is used. This can be a serious problem and can cause
+ crashes on Cortex-M3 if the ARM libgcc is used, for example. The fix
+ is to include ARCHCPUFLAGS on the gcc command line when asking it to
+ -print-libgcc-file-name.
diff --git a/nuttx/arch/arm/src/Makefile b/nuttx/arch/arm/src/Makefile
index 730d41ba1..7e1cfdb0c 100644
--- a/nuttx/arch/arm/src/Makefile
+++ b/nuttx/arch/arm/src/Makefile
@@ -85,7 +85,7 @@ LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS))))
BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board
-LIBGCC = "${shell $(CC) -print-libgcc-file-name}"
+LIBGCC = "${shell $(CC) $(ARCHCPUFLAGS) -print-libgcc-file-name}"
VPATH = chip:common:$(ARCH_SUBDIR)
diff --git a/nuttx/arch/avr/src/Makefile b/nuttx/arch/avr/src/Makefile
index 7683bcfdd..fa66d6dfa 100644
--- a/nuttx/arch/avr/src/Makefile
+++ b/nuttx/arch/avr/src/Makefile
@@ -90,7 +90,7 @@ LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS))))
BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board
-LIBGCC = "${shell $(CC) -print-libgcc-file-name}"
+LIBGCC = "${shell $(CC) $(ARCHCPUFLAGS) -print-libgcc-file-name}"
VPATH = chip:common:$(ARCH_SUBDIR)
diff --git a/nuttx/arch/hc/src/Makefile b/nuttx/arch/hc/src/Makefile
index 57a6d4305..a5e0425a8 100755
--- a/nuttx/arch/hc/src/Makefile
+++ b/nuttx/arch/hc/src/Makefile
@@ -82,7 +82,7 @@ LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS))))
BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board
-LIBGCC = "${shell $(CC) -print-libgcc-file-name}"
+LIBGCC = "${shell $(CC) $(ARCHCPUFLAGS) -print-libgcc-file-name}"
VPATH = chip:common:$(ARCH_SUBDIR)
diff --git a/nuttx/arch/mips/src/Makefile b/nuttx/arch/mips/src/Makefile
index 19981282f..8d0f4d5af 100644
--- a/nuttx/arch/mips/src/Makefile
+++ b/nuttx/arch/mips/src/Makefile
@@ -79,7 +79,7 @@ LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS))))
BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board
-LIBGCC = "${shell $(CC) -print-libgcc-file-name}"
+LIBGCC = "${shell $(CC) $(ARCHCPUFLAGS) -print-libgcc-file-name}"
VPATH = chip:common:$(ARCH_SUBDIR)
diff --git a/nuttx/arch/sh/src/Makefile b/nuttx/arch/sh/src/Makefile
index 56fe3ac5e..fdf6cc852 100644
--- a/nuttx/arch/sh/src/Makefile
+++ b/nuttx/arch/sh/src/Makefile
@@ -59,7 +59,7 @@ LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS))))
BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board
-LIBGCC = ${shell $(CC) -print-libgcc-file-name}
+LIBGCC = ${shell $(CC) $(ARCHCPUFLAGS) -print-libgcc-file-name}
VPATH = chip:common
diff --git a/nuttx/arch/x86/src/Makefile b/nuttx/arch/x86/src/Makefile
index 6be4053af..d7b2140c8 100644
--- a/nuttx/arch/x86/src/Makefile
+++ b/nuttx/arch/x86/src/Makefile
@@ -79,7 +79,7 @@ LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS))))
BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board
-LIBGCC = "${shell $(CC) -print-libgcc-file-name}"
+LIBGCC = "${shell $(CC) $(ARCHCPUFLAGS) -print-libgcc-file-name}"
ifeq ($(HOSTOS),FreeBSD)
HOST_ARCH = ${shell uname -m 2>/dev/null || echo "Other"}
diff --git a/nuttx/arch/z80/src/Makefile.sdcc b/nuttx/arch/z80/src/Makefile.sdcc
index 24099fc92..a9152ea79 100644
--- a/nuttx/arch/z80/src/Makefile.sdcc
+++ b/nuttx/arch/z80/src/Makefile.sdcc
@@ -75,7 +75,7 @@ VPATH = chip:common:board
# Libraries
-LIBGCC = ${shell $(CC) -print-libgcc-file-name}
+LIBGCC = ${shell $(CC) $(ARCHCPUFLAGS) -print-libgcc-file-name}
# Supports dynamic sizing of HEAP.
#