mirror of https://github.com/adtools/clib2.git
Merge pull request #3 from adtools/gcc5-fixes
Fixes for compiling with GCC 5.4.0 on AmigaOS 4.1
This commit is contained in:
commit
e36ebff16e
|
@ -60,7 +60,7 @@ WARNINGS := \
|
|||
# -Wconversion -Wshadow
|
||||
|
||||
INCLUDES := -Iinclude -I. -I$(SDK_INCLUDE)
|
||||
OPTIONS := -DUSE_64_BIT_INTS -D__USE_INLINE__ -Wa,-mregnames -fno-common -std=gnu99 -mcrt=clib2
|
||||
OPTIONS := -DUSE_64_BIT_INTS -D__USE_INLINE__ -Wa,-mregnames -fno-builtin -fno-common -std=c99 -mcrt=clib2
|
||||
OPTIMIZE := -DNDEBUG -O3
|
||||
|
||||
#DEBUG := -ggdb
|
||||
|
@ -160,6 +160,10 @@ cvs-tag:
|
|||
|
||||
# General build rules for all object files and the individual libraries
|
||||
|
||||
lib/crtbegin.o : CFLAGS += -fno-aggressive-loop-optimizations
|
||||
lib/crtbegin.o : crtbegin.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib/%.o : AFLAGS += $(LARGEDATA)
|
||||
lib/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
@ -171,6 +175,11 @@ lib/small-data/%.o : AFLAGS += $(SMALLDATA)
|
|||
lib/small-data/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib/small-data/crtbegin.o : CFLAGS += $(SMALLDATA) -fno-aggressive-loop-optimizations
|
||||
lib/small-data/crtbegin.o : crtbegin.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib/small-data/%.o : CFLAGS += $(SMALLDATA)
|
||||
lib/small-data/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
|
@ -178,6 +187,11 @@ lib/soft-float/%.o : AFLAGS += $(SOFTFLOAT)
|
|||
lib/soft-float/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib/soft-float/crtbegin.o : CFLAGS += $(SOFTFLOAT) -fno-aggressive-loop-optimizations
|
||||
lib/soft-float/crtbegin.o : crtbegin.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib/soft-float/%.o : CFLAGS += $(SOFTFLOAT)
|
||||
lib/soft-float/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
|
@ -185,6 +199,11 @@ lib/baserel/%.o : AFLAGS += $(BASEREL)
|
|||
lib/baserel/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib/baserel/crtbegin.o : CFLAGS += $(BASEREL) -fno-aggressive-loop-optimizations
|
||||
lib/baserel/crtbegin.o : crtbegin.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib/baserel/%.o : CFLAGS += $(BASEREL)
|
||||
lib/baserel/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
|
@ -192,6 +211,11 @@ lib.threadsafe/%.o : AFLAGS += $(LARGEDATA) $(THREADSAFE)
|
|||
lib.threadsafe/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib.threadsafe/crtbegin.o : CFLAGS += $(THREADSAFE) $(LARGEDATA) -fno-aggressive-loop-optimizations
|
||||
lib.threadsafe/crtbegin.o : crtbegin.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib.threadsafe/%.o : CFLAGS += $(THREADSAFE) $(LARGEDATA)
|
||||
lib.threadsafe/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
|
@ -199,6 +223,11 @@ lib.threadsafe/small-data/%.o : AFLAGS += $(SMALLDATA) $(THREADSAFE)
|
|||
lib.threadsafe/small-data/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib.threadsafe/small-data/crtbegin.o : CFLAGS += $(THREADSAFE) $(SMALLDATA) -fno-aggressive-loop-optimizations
|
||||
lib.threadsafe/small-data/crtbegin.o : crtbegin.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib.threadsafe/small-data/%.o : CFLAGS += $(THREADSAFE) $(SMALLDATA)
|
||||
lib.threadsafe/small-data/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
|
@ -206,6 +235,11 @@ lib.threadsafe/soft-float/%.o : AFLAGS += $(SOFTFLOAT) $(THREADSAFE)
|
|||
lib.threadsafe/soft-float/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib.threadsafe/soft-float/crtbegin.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT) -fno-aggressive-loop-optimizations
|
||||
lib.threadsafe/soft-float/crtbegin.o : crtbegin.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib.threadsafe/soft-float/%.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT)
|
||||
lib.threadsafe/soft-float/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
|
@ -213,6 +247,11 @@ lib.threadsafe/baserel/%.o : AFLAGS += $(BASEREL) $(THREADSAFE)
|
|||
lib.threadsafe/baserel/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib.threadsafe/baserel/crtbegin.o : CFLAGS += $(THREADSAFE) $(BASEREL) -fno-aggressive-loop-optimizations
|
||||
lib.threadsafe/baserel/crtbegin.o : crtbegin.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib.threadsafe/baserel/%.o : CFLAGS += $(THREADSAFE) $(BASEREL)
|
||||
lib.threadsafe/baserel/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define VERSION 1
|
||||
#define REVISION 214
|
||||
#define DATE "27.4.2017"
|
||||
#define VERS "amiga.lib 1.214"
|
||||
#define VSTRING "amiga.lib 1.214 (27.4.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: amiga.lib 1.214 (27.4.2017)"
|
||||
#define REVISION 215
|
||||
#define DATE "26.6.2017"
|
||||
#define VERS "amiga.lib 1.215"
|
||||
#define VSTRING "amiga.lib 1.215 (26.6.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: amiga.lib 1.215 (26.6.2017)"
|
||||
|
|
|
@ -1 +1 @@
|
|||
214
|
||||
215
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define VERSION 1
|
||||
#define REVISION 214
|
||||
#define DATE "27.4.2017"
|
||||
#define VERS "c.lib 1.214"
|
||||
#define VSTRING "c.lib 1.214 (27.4.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: c.lib 1.214 (27.4.2017)"
|
||||
#define REVISION 215
|
||||
#define DATE "26.6.2017"
|
||||
#define VERS "c.lib 1.215"
|
||||
#define VSTRING "c.lib 1.215 (26.6.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: c.lib 1.215 (26.6.2017)"
|
||||
|
|
|
@ -1 +1 @@
|
|||
214
|
||||
215
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
c.lib 1.215 (26.6.2017)
|
||||
|
||||
- Added -fno-aggressive-loop-optimizations option when building crtbegin.c
|
||||
to work around constructor/destructor hack with GCC 5.4.0 on AmigaOS 4.
|
||||
|
||||
- Added -fno-builtin option to fix conflicts with builtin memset()
|
||||
with GCC 5.4.0 on AmigaOS 4.
|
||||
|
||||
|
||||
c.lib 1.214 (27.4.2017)
|
||||
|
||||
- Added integer overflow test to calloc().
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: crtbegin.c,v 1.13 2010-08-21 11:37:03 obarthel Exp $
|
||||
* crtbegin.c
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
|
@ -48,7 +48,12 @@
|
|||
* Dummy constructor and destructor array. The linker script will put these at the
|
||||
* very beginning of section ".ctors" and ".dtors". crtend.o contains a similar entry
|
||||
* with a NULL pointer entry and is put at the end of the sections. This way, the init
|
||||
* code can find the global constructor/destructor pointers
|
||||
* code can find the global constructor/destructor pointers.
|
||||
*
|
||||
* WARNING:
|
||||
* This hack does not work correctly with GCC 5 and higher. The optimizer
|
||||
* will see a one element array and act appropriately. The current workaround
|
||||
* is to use -fno-aggressive-loop-optimizations when compiling this file.
|
||||
*/
|
||||
static void (*__CTOR_LIST__[1]) (void) __attribute__(( used, section(".ctors"), aligned(sizeof(void (*)(void))) ));
|
||||
static void (*__DTOR_LIST__[1]) (void) __attribute__(( used, section(".dtors"), aligned(sizeof(void (*)(void))) ));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define VERSION 1
|
||||
#define REVISION 214
|
||||
#define DATE "27.4.2017"
|
||||
#define VERS "debug.lib 1.214"
|
||||
#define VSTRING "debug.lib 1.214 (27.4.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: debug.lib 1.214 (27.4.2017)"
|
||||
#define REVISION 215
|
||||
#define DATE "26.6.2017"
|
||||
#define VERS "debug.lib 1.215"
|
||||
#define VSTRING "debug.lib 1.215 (26.6.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: debug.lib 1.215 (26.6.2017)"
|
||||
|
|
|
@ -1 +1 @@
|
|||
214
|
||||
215
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define VERSION 1
|
||||
#define REVISION 214
|
||||
#define DATE "27.4.2017"
|
||||
#define VERS "m.lib 1.214"
|
||||
#define VSTRING "m.lib 1.214 (27.4.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: m.lib 1.214 (27.4.2017)"
|
||||
#define REVISION 215
|
||||
#define DATE "26.6.2017"
|
||||
#define VERS "m.lib 1.215"
|
||||
#define VSTRING "m.lib 1.215 (26.6.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: m.lib 1.215 (26.6.2017)"
|
||||
|
|
|
@ -1 +1 @@
|
|||
214
|
||||
215
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define VERSION 1
|
||||
#define REVISION 214
|
||||
#define DATE "27.4.2017"
|
||||
#define VERS "net.lib 1.214"
|
||||
#define VSTRING "net.lib 1.214 (27.4.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: net.lib 1.214 (27.4.2017)"
|
||||
#define REVISION 215
|
||||
#define DATE "26.6.2017"
|
||||
#define VERS "net.lib 1.215"
|
||||
#define VSTRING "net.lib 1.215 (26.6.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: net.lib 1.215 (26.6.2017)"
|
||||
|
|
|
@ -1 +1 @@
|
|||
214
|
||||
215
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define VERSION 1
|
||||
#define REVISION 214
|
||||
#define DATE "27.4.2017"
|
||||
#define VERS "unix.lib 1.214"
|
||||
#define VSTRING "unix.lib 1.214 (27.4.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: unix.lib 1.214 (27.4.2017)"
|
||||
#define REVISION 215
|
||||
#define DATE "26.6.2017"
|
||||
#define VERS "unix.lib 1.215"
|
||||
#define VSTRING "unix.lib 1.215 (26.6.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: unix.lib 1.215 (26.6.2017)"
|
||||
|
|
|
@ -1 +1 @@
|
|||
214
|
||||
215
|
||||
|
|
Loading…
Reference in New Issue