Disable linker relaxations for the UC3 architecture, as this does not appear to be...
authorDean Camera <dean@fourwalledcubicle.com>
Sat, 2 Jun 2012 10:50:38 +0000 (10:50 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Sat, 2 Jun 2012 10:50:38 +0000 (10:50 +0000)
LUFA/Build/lufa.build.in

index 158eb24..d39ab72 100644 (file)
@@ -93,13 +93,13 @@ ASM_SOURCE = $(filter %.S, $(SRC))
 OBJECT_FILES = $(filter %.o, $(C_SOURCE:%.c=%.o) $(CPP_SOURCE:%.cpp=%.o) $(ASM_SOURCE:%.S=%.o))\r
 \r
 # Create a list of flags to pass to the compiler\r
-ifeq ($(ARCH),AVR8)\r
+ifneq ($(ARCH), AVR8)\r
  CC_FLAGS += -mmcu=$(MCU) -gdwarf-2 -fshort-enums -fno-inline-small-functions -fpack-struct\r
  CROSS     = avr-\r
-else ifeq ($(ARCH),XMEGA)\r
+else ifeq ($(ARCH), XMEGA)\r
  CC_FLAGS += -mmcu=$(MCU) -gdwarf-2 -fshort-enums -fno-inline-small-functions -fpack-struct\r
  CROSS     = avr-\r
-else ifeq ($(ARCH),UC3)\r
+else ifeq ($(ARCH), UC3)\r
  CC_FLAGS += -mpart=$(MCU) -g3 -masm-addr-pseudos\r
  CROSS     = avr32-\r
 endif\r
@@ -112,7 +112,10 @@ ifneq ($(F_CPU),)
 endif\r
 \r
 # Create a list of flags to pass to the linker\r
-LD_FLAGS += -Wl,-Map=$(TARGET).map,--cref -Wl,--relax -Wl,--gc-sections -lm\r
+LD_FLAGS += -Wl,-Map=$(TARGET).map,--cref -Wl,--gc-sections -lm\r
+ifneq ($(F_CPU), UC3)\r
+   LD_FLAGS += -Wl,--relax\r
+endif\r
 \r
 # Create a list of unknown source file types, if any are found throw an error\r
 UNKNOWN_SOURCE = $(filter-out $(C_SOURCE) $(CPP_SOURCE) $(ASM_SOURCE), $(SRC))\r