From a9f5ec3e21797f58ca82b95999ef245ff8f986d8 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Fri, 19 Feb 2016 22:09:15 +1000 Subject: [PATCH] Put CFLAGS -fno-builtin and LDFLAGS -nostdlib seperate to CC and LD variables --- config/Makefile.cygming | 6 ++++-- config/Makefile.fedora-mingw32 | 7 ++++--- config/Makefile.linux-mingw-w64 | 6 ++++-- config/Makefile.linux-mingw32 | 7 ++++--- config/Makefile.linux-mingw64 | 7 ++++--- config/Makefile.mingw | 6 ++++-- config/Makefile.msys | 6 ++++-- 7 files changed, 28 insertions(+), 17 deletions(-) diff --git a/config/Makefile.cygming b/config/Makefile.cygming index 842fba5..dcd7b21 100644 --- a/config/Makefile.cygming +++ b/config/Makefile.cygming @@ -4,11 +4,13 @@ BINDIR = /usr/bin LIBDIR = /usr/lib/mingw INCDIR = /usr/include/mingw/GL # use gcc for linking, with ld it does not work -CC := gcc -mno-cygwin -fno-builtin -fno-stack-protector -LD := gcc -mno-cygwin -nostdlib +CC := gcc -mno-cygwin +LD := gcc -mno-cygwin LN := LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 LDFLAGS.EXTRA = -L$(LIBDIR) +CFLAGS.EXTRA += -fno-builtin -fno-stack-protector +LDFLAGS.EXTRA += -nostdlib WARN = -Wall -W POPT = -O2 BIN.SUFFIX = .exe diff --git a/config/Makefile.fedora-mingw32 b/config/Makefile.fedora-mingw32 index 4110ce7..9bad92a 100644 --- a/config/Makefile.fedora-mingw32 +++ b/config/Makefile.fedora-mingw32 @@ -2,10 +2,11 @@ # http://www.mingw.org/ # # $ make SYSTEM=fedora-mingw32 -# include config/Makefile.linux-mingw32 -CC := i686-pc-mingw32-gcc -fno-builtin -fno-stack-protector -LD := i686-pc-mingw32-ld -nostdlib +CC := i686-pc-mingw32-gcc +LD := i686-pc-mingw32-ld LDFLAGS.GL += -L/usr/i686-pc-mingw32/sys-root/mingw/lib +CFLAGS.EXTRA += -fno-builtin -fno-stack-protector +LDFLAGS.EXTRA += -nostdlib diff --git a/config/Makefile.linux-mingw-w64 b/config/Makefile.linux-mingw-w64 index 2822a1e..175f5a9 100644 --- a/config/Makefile.linux-mingw-w64 +++ b/config/Makefile.linux-mingw-w64 @@ -5,11 +5,13 @@ # NAME := glew32 -CC := i686-w64-mingw32-gcc -fno-builtin -fno-stack-protector -LD := i686-w64-mingw32-ld -nostdlib +CC := i686-w64-mingw32-gcc +LD := i686-w64-mingw32-ld LN := STRIP := LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 +CFLAGS.EXTRA += -fno-builtin -fno-stack-protector +LDFLAGS.EXTRA += -nostdlib WARN = -Wall -W POPT = -O2 BIN.SUFFIX = .exe diff --git a/config/Makefile.linux-mingw32 b/config/Makefile.linux-mingw32 index cc389c1..9adb205 100644 --- a/config/Makefile.linux-mingw32 +++ b/config/Makefile.linux-mingw32 @@ -2,15 +2,16 @@ # http://www.mingw.org/ # # $ make SYSTEM=linux-mingw32 -# NAME := glew32 HOST := i586-mingw32msvc -CC := $(HOST)-gcc -fno-builtin -fno-stack-protector -LD := $(HOST)-ld -nostdlib +CC := $(HOST)-gcc +LD := $(HOST)-ld LN := STRIP := LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 +CFLAGS.EXTRA += -fno-builtin -fno-stack-protector +LDFLAGS.EXTRA += -nostdlib WARN = -Wall -W POPT = -O2 BIN.SUFFIX = .exe diff --git a/config/Makefile.linux-mingw64 b/config/Makefile.linux-mingw64 index 439b4e9..8bc3894 100644 --- a/config/Makefile.linux-mingw64 +++ b/config/Makefile.linux-mingw64 @@ -2,15 +2,16 @@ # http://www.mingw.org/ # # $ make SYSTEM=linux-mingw64 -# NAME := glew32 HOST := i686-w64-mingw32 -CC := $(HOST)-gcc -fno-builtin -fno-stack-protector -LD := $(HOST)-ld -nostdlib +CC := $(HOST)-gcc +LD := $(HOST)-ld LN := STRIP := LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 +CFLAGS.EXTRA += -fno-builtin -fno-stack-protector +LDFLAGS.EXTRA += -nostdlib WARN = -Wall -W POPT = -O2 BIN.SUFFIX = .exe diff --git a/config/Makefile.mingw b/config/Makefile.mingw index 56b5dcc..3f413ee 100644 --- a/config/Makefile.mingw +++ b/config/Makefile.mingw @@ -1,10 +1,12 @@ NAME = glew32 # use gcc for linking, with ld it does not work -CC := gcc -fno-builtin -fno-stack-protector -LD := gcc -nostdlib +CC := gcc -fno-builtin +LD := gcc LN := LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 LDFLAGS.EXTRA = -L/mingw/lib +CFLAGS.EXTRA += -fno-builtin -fno-stack-protector +LDFLAGS.EXTRA += -nostdlib WARN = -Wall -W POPT = -O2 BIN.SUFFIX = .exe diff --git a/config/Makefile.msys b/config/Makefile.msys index f765b0e..b5187af 100644 --- a/config/Makefile.msys +++ b/config/Makefile.msys @@ -1,11 +1,13 @@ NAME = glew32 # use gcc for linking, with ld it does not work -CC := gcc -fno-builtin -fno-stack-protector -LD := gcc -nostdlib +CC := gcc +LD := gcc LN := CFLAGS.EXTRA += -D_WIN32 LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 LDFLAGS.EXTRA = +CFLAGS.EXTRA += -fno-builtin -fno-stack-protector +LDFLAGS.EXTRA += -nostdlib LIBDIR = $(GLEW_DEST)/bin WARN = -Wall -W POPT = -O2