-gcc_ok = $(shell if gcc $(1) -c -x c /dev/null -o /dev/null 2>/dev/null; \
+gcc_ok = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null 2>/dev/null; \
then echo $(1); else echo $(2); fi)
M32 := $(call gcc_ok,-m32,)
ALIGN := $(call gcc_ok,-falign-functions=0 -falign-jumps=0 -falign-loops=0,-malign-functions=0 -malign-jumps=0 -malign-loops=0)
-CC = gcc $(M32) -funsigned-char
-CFLAGS = -g -W -Wall -march=i386 $(ALIGN) -Os
+CC = gcc
+CFLAGS = $(M32) -funsigned-char -g -W -Wall -march=i386 $(ALIGN) -Os
AR = ar
AS = as
LD = ld -m elf_i386
PROVIDE (__etext = .);
PROVIDE (_etext = .);
PROVIDE (etext = .);
- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
- .rodata1 : { *(.rodata1) }
- .eh_frame_hdr : { *(.eh_frame_hdr) }
- .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
- .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table) }
+ .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
+ .rodata1 : { *(.rodata1) }
+ .eh_frame_hdr : { *(.eh_frame_hdr) }
+ .eh_frame : { KEEP (*(.eh_frame)) }
+ .gcc_except_table : { *(.gcc_except_table) }
/* For backward-compatibility with tools that don't support the
*_array_* sections below, our glibc's crt files contain weak
definitions of symbols that they reference. We don't want to use
.data1 : { *(.data1) }
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
- .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
- .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table) }
.dynamic : { *(.dynamic) }
.ctors :
{