Try being more portable...
authorhpa <hpa>
Mon, 2 Feb 2004 22:45:28 +0000 (22:45 +0000)
committerhpa <hpa>
Mon, 2 Feb 2004 22:45:28 +0000 (22:45 +0000)
menu/Makefile
menu/com16.ld

index e782a4c..7e93811 100644 (file)
@@ -1,11 +1,11 @@
-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
index 7310929..8154f2a 100644 (file)
@@ -63,11 +63,11 @@ SECTIONS
   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
@@ -100,8 +100,6 @@ SECTIONS
   .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          :
   {