OPTIMFLAGS = -O2
DEBUGFLAGS = -Wall
CFLAGS = $(OPTIMFLAGS) -fpic -fshort-wchar $(DEBUGFLAGS)
-LDFLAGS = -nostdlib
+LDFLAGS = -nostdlib -znocombreloc
INSTALL = install
ifeq ($(CONFIG_machspec_netconfig),y)
CFLAGS += -DCONFIG_CHOOSER_TEXTMENU
endif
+prefix = /usr/bin/
+ # Redhat 8.0 ia32 gcc-3.x version is reported to produce working EFI binaries.
+ # Redhat 9.0 ia32 gcc-3.x version is reported to produce BAD binaries.
+CC = $(prefix)gcc
+AS = $(prefix)as
+LD = $(prefix)ld
+AR = $(prefix)ar
+RANLIB = $(prefix)ranlib
+OBJCOPY = $(prefix)objcopy
+
ifeq ($(ARCH),ia64)
- prefix = /usr/bin/
- CC = $(prefix)gcc
- AS = $(prefix)as
- LD = $(prefix)ld
- LD = ld
- AR = $(prefix)ar
- RANLIB = $(prefix)ranlib
- OBJCOPY = $(prefix)objcopy
-
-GCC_VERSION=$(shell $(CROSS_COMPILE)$(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.')
-
-ifneq ($(GCC_VERSION),2)
+ GCC_VERSION=$(shell $(CROSS_COMPILE)$(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.')
+
+ ifneq ($(GCC_VERSION),2)
CFLAGS += -frename-registers
-endif
-#
-# EFI specs allows only lower floating point partition to be used
-#
-# Redhat 8.0 gcc-3.x version is reported to produce working EFI binaries.
-# Redhat 9.0 gcc-3.x version is reported to produce BAD binaries.
-#
-CFLAGS += -mfixed-range=f32-f127
-else
- ifeq ($(ARCH),ia32)
- prefix = /usr/bin/
- CC = $(prefix)gcc
- AS = $(prefix)as
- LD = $(prefix)ld
- AR = $(prefix)ar
- RANLIB = $(prefix)ranlib
- OBJCOPY = $(prefix)objcopy
endif
+
+ # EFI specs allows only lower floating point partition to be used
+ CFLAGS += -mfixed-range=f32-f127
endif