From 28fe426d29a07b9e10c2c13066b42273184c88f3 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 25 Feb 2015 09:54:48 -0600 Subject: Adjust microMIPS compile options to enable interlinking with 32-bit code --- nuttx/arch/mips/src/mips32/Toolchain.defs | 10 ++++++---- nuttx/configs/pic32mz-starterkit/nsh/Make.defs | 1 + nuttx/include/nuttx/net/netconfig.h | 9 +++++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/nuttx/arch/mips/src/mips32/Toolchain.defs b/nuttx/arch/mips/src/mips32/Toolchain.defs index 21974a88a..5aeed13bb 100644 --- a/nuttx/arch/mips/src/mips32/Toolchain.defs +++ b/nuttx/arch/mips/src/mips32/Toolchain.defs @@ -104,12 +104,14 @@ ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) endif ifeq ($(CONFIG_ARCH_MIPS_M14K),y) - MIPS_MARCH = 24kc - MIPS_MPROCESSOR = elf32pic32mx - MIPS_MICROMIPS = -mmicromips -else MIPS_MARCH = m14k MIPS_MPROCESSOR = elf32pic32mz +# MIPS_MICROMIPS = -mmicromips +# MIPS_MICROMIPS = -mmicromips -minterlink-mips16 -mno-jals + MIPS_MICROMIPS = -mmicromips -minterlink-compressed +else + MIPS_MARCH = 24kc + MIPS_MPROCESSOR = elf32pic32mx MIPS_MICROMIPS = endif diff --git a/nuttx/configs/pic32mz-starterkit/nsh/Make.defs b/nuttx/configs/pic32mz-starterkit/nsh/Make.defs index 51a963586..5562a041f 100644 --- a/nuttx/configs/pic32mz-starterkit/nsh/Make.defs +++ b/nuttx/configs/pic32mz-starterkit/nsh/Make.defs @@ -98,6 +98,7 @@ CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) AFLAGS = $(CFLAGS) -D__ASSEMBLY__ +LDFLAGS = # -no-isn32 --relax NXFLATLDFLAGS1 = -r -d -warn-common NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld -no-check-sections diff --git a/nuttx/include/nuttx/net/netconfig.h b/nuttx/include/nuttx/net/netconfig.h index 4f654e809..4c6f58d15 100644 --- a/nuttx/include/nuttx/net/netconfig.h +++ b/nuttx/include/nuttx/net/netconfig.h @@ -251,6 +251,8 @@ # define UDP_IPv6_MSS(d) UDP_MSS(d,IPv6_HDRLEN) # define ETH_IPv6_UDP_MSS ETH_UDP_MSS(IPv6_HDRLEN) # define SLIP_IPv6_UDP_MSS SLIP_UDP_MSS(IPv6_HDRLEN) + +# define MAX_IPv6_UDP_MSS __MAX_UDP_MSS(IPv6_HDRLEN) # define MAX_UDP_MSS __MAX_UDP_MSS(IPv6_HDRLEN) #endif @@ -258,16 +260,19 @@ # define UDP_IPv4_MSS(d) UDP_MSS(d,IPv4_HDRLEN) # define ETH_IPv4_UDP_MSS ETH_UDP_MSS(IPv4_HDRLEN) # define SLIP_IPv4_UDP_MSS SLIP_UDP_MSS(IPv4_HDRLEN) + # define MIN_IPv4_UDP_MSS __MIN_UDP_MSS(IPv4_HDRLEN) # define MIN_UDP_MSS __MIN_UDP_MSS(IPv4_HDRLEN) -# undef MAX_UDP_MSS + +# undef MAX_UDP_MSS +# define MAX_IPv4_UDP_MSS __MAX_UDP_MSS(IPv4_HDRLEN) # define MAX_UDP_MSS __MAX_UDP_MSS(IPv4_HDRLEN) #endif /* If IPv6 is support, it will have the smaller MSS */ #ifdef CONFIG_NET_IPv6 -# undef MIN_UDP_MSS +# undef MIN_UDP_MSS # define MIN_IPv6_UDP_MSS __MIN_UDP_MSS(IPv6_HDRLEN) # define MIN_UDP_MSS __MIN_UDP_MSS(IPv6_HDRLEN) #endif -- cgit v1.2.3