From 6c0a9c04382dceb02f8a69b401a0e5ecc920c206 Mon Sep 17 00:00:00 2001 From: uz Date: Sun, 7 Nov 2010 11:34:51 +0000 Subject: [PATCH] Patch to correct the linkorder in the make files to make the --as-needed ldflag work. By Mario Fetka. git-svn-id: svn://svn.cc65.org/cc65/trunk@4838 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ar65/make/gcc.mak | 2 +- src/ca65/make/gcc.mak | 2 +- src/cc65/make/gcc.mak | 2 +- src/cl65/make/gcc.mak | 2 +- src/co65/make/gcc.mak | 2 +- src/da65/make/gcc.mak | 2 +- src/grc/make/gcc.mak | 2 +- src/ld65/make/gcc.mak | 2 +- src/od65/make/gcc.mak | 2 +- src/sim65/make/gcc.mak | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ar65/make/gcc.mak b/src/ar65/make/gcc.mak index fe1ec6c73..bf12c73ff 100644 --- a/src/ar65/make/gcc.mak +++ b/src/ar65/make/gcc.mak @@ -51,7 +51,7 @@ all: depend endif $(EXE): $(OBJS) $(LIBS) - $(CC) $^ $(LDFLAGS) -o $@ + $(CC) $(LDFLAGS) $^ -o $@ @if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi clean: diff --git a/src/ca65/make/gcc.mak b/src/ca65/make/gcc.mak index 0c70a30d3..b82923baf 100644 --- a/src/ca65/make/gcc.mak +++ b/src/ca65/make/gcc.mak @@ -93,7 +93,7 @@ all: depend endif $(EXE): $(INCS) $(OBJS) $(LIBS) - $(CC) $(OBJS) $(LIBS) $(LDFLAGS) -o $@ + $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ @if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi inc: $(INCS) diff --git a/src/cc65/make/gcc.mak b/src/cc65/make/gcc.mak index a2fbe4c2b..3e3044091 100644 --- a/src/cc65/make/gcc.mak +++ b/src/cc65/make/gcc.mak @@ -127,7 +127,7 @@ all: depend endif $(EXE): $(OBJS) $(LIBS) - $(CC) $(OBJS) $(LIBS) $(LDFLAGS) -o $@ + $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -lm -o $@ @if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi .PHONY: svnversion diff --git a/src/cl65/make/gcc.mak b/src/cl65/make/gcc.mak index 2b0dda733..970031c46 100644 --- a/src/cl65/make/gcc.mak +++ b/src/cl65/make/gcc.mak @@ -44,7 +44,7 @@ all: depend endif $(EXE): $(OBJS) $(LIBS) - $(CC) $^ $(LDFLAGS) -o $@ + $(CC) $(LDFLAGS) $^ -o $@ @if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi clean: diff --git a/src/co65/make/gcc.mak b/src/co65/make/gcc.mak index 6deb4f81d..24310d702 100644 --- a/src/co65/make/gcc.mak +++ b/src/co65/make/gcc.mak @@ -44,7 +44,7 @@ all: depend endif $(EXE): $(OBJS) $(LIBS) - $(CC) $^ $(LDFLAGS) -o $@ + $(CC) $(LDFLAGS) $^ -o $@ @if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi clean: diff --git a/src/da65/make/gcc.mak b/src/da65/make/gcc.mak index 90dde8700..06b5adad1 100644 --- a/src/da65/make/gcc.mak +++ b/src/da65/make/gcc.mak @@ -59,7 +59,7 @@ all: depend endif $(EXE): $(OBJS) $(LIBS) - $(CC) $^ $(LDFLAGS) -o $@ + $(CC) $(LDFLAGS) $^ -o $@ @if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi clean: diff --git a/src/grc/make/gcc.mak b/src/grc/make/gcc.mak index f5903fe98..285ae8f33 100644 --- a/src/grc/make/gcc.mak +++ b/src/grc/make/gcc.mak @@ -38,7 +38,7 @@ all: depend endif $(EXE): $(OBJS) $(LIBS) - $(CC) $^ $(LDFLAGS) -o $@ + $(CC) $(LDFLAGS) $^ -o $@ @if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi clean: diff --git a/src/ld65/make/gcc.mak b/src/ld65/make/gcc.mak index d098ec4be..9d5c0c996 100644 --- a/src/ld65/make/gcc.mak +++ b/src/ld65/make/gcc.mak @@ -100,7 +100,7 @@ all: depend endif $(EXE): $(INCS) $(OBJS) $(LIBS) - $(CC) $(OBJS) $(LIBS) $(LDFLAGS) -o $@ + $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ @if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi inc: $(INCS) diff --git a/src/od65/make/gcc.mak b/src/od65/make/gcc.mak index dd7714b83..9a9855a81 100644 --- a/src/od65/make/gcc.mak +++ b/src/od65/make/gcc.mak @@ -44,7 +44,7 @@ all: depend endif $(EXE): $(OBJS) $(LIBS) - $(CC) $^ $(LDFLAGS) -o $@ + $(CC) $(LDFLAGS) $^ -o $@ @if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi clean: diff --git a/src/sim65/make/gcc.mak b/src/sim65/make/gcc.mak index 0372431ef..bbde6f84d 100644 --- a/src/sim65/make/gcc.mak +++ b/src/sim65/make/gcc.mak @@ -53,7 +53,7 @@ all: depend endif $(EXE): $(OBJS) $(LIBS) - $(CC) $^ $(LDFLAGS) -o $@ + $(CC) $(LDFLAGS) $^ -o $@ @if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi .PHONY: chips -- 2.39.5