diff --git a/config/Makefile.cygming b/config/Makefile.cygming index a356c5c..842fba5 100644 --- a/config/Makefile.cygming +++ b/config/Makefile.cygming @@ -4,8 +4,8 @@ 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 -LD := gcc -mno-cygwin +CC := gcc -mno-cygwin -fno-builtin -fno-stack-protector +LD := gcc -mno-cygwin -nostdlib LN := LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 LDFLAGS.EXTRA = -L$(LIBDIR) @@ -17,8 +17,3 @@ LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib LIB.SHARED = $(NAME).dll LIB.STATIC = lib$(NAME).a # the static lib will be broken LDFLAGS.SO = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK) -LIB.SONAME.MX = lib$(NAME)mx.dll -LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib -LIB.SHARED.MX = $(NAME)mx.dll -LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken -LDFLAGS.SO.MX = -shared -Wl,-soname,$(LIB.SONAME.MX) -Wl,--out-implib,lib/$(LIB.DEVLNK.MX) diff --git a/config/Makefile.fedora-mingw32 b/config/Makefile.fedora-mingw32 index f27db34..4110ce7 100644 --- a/config/Makefile.fedora-mingw32 +++ b/config/Makefile.fedora-mingw32 @@ -6,6 +6,6 @@ include config/Makefile.linux-mingw32 -CC := i686-pc-mingw32-gcc -LD := i686-pc-mingw32-ld +CC := i686-pc-mingw32-gcc -fno-builtin -fno-stack-protector +LD := i686-pc-mingw32-ld -nostdlib LDFLAGS.GL += -L/usr/i686-pc-mingw32/sys-root/mingw/lib diff --git a/config/Makefile.linux-mingw-w64 b/config/Makefile.linux-mingw-w64 index 57cd203..2822a1e 100644 --- a/config/Makefile.linux-mingw-w64 +++ b/config/Makefile.linux-mingw-w64 @@ -5,11 +5,11 @@ # NAME := glew32 -CC := i686-w64-mingw32-gcc -LD := i686-w64-mingw32-ld +CC := i686-w64-mingw32-gcc -fno-builtin -fno-stack-protector +LD := i686-w64-mingw32-ld -nostdlib LN := STRIP := -LDFLAGS.GL = -lopengl32 -lgdi32 -lmsvcrt -luser32 -lkernel32 +LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 WARN = -Wall -W POPT = -O2 BIN.SUFFIX = .exe @@ -18,8 +18,3 @@ LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib LIB.SHARED = $(NAME).dll LIB.STATIC = lib$(NAME).a # the static lib will be broken LDFLAGS.SO = -shared -soname $(LIB.SONAME) --out-implib lib/$(LIB.DEVLNK) -LIB.SONAME.MX = lib$(NAME)mx.dll -LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib -LIB.SHARED.MX = $(NAME)mx.dll -LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken -LDFLAGS.SO.MX = -shared -soname $(LIB.SONAME.MX) --out-implib lib/$(LIB.DEVLNK.MX) diff --git a/config/Makefile.linux-mingw32 b/config/Makefile.linux-mingw32 index 049ee74..cc389c1 100644 --- a/config/Makefile.linux-mingw32 +++ b/config/Makefile.linux-mingw32 @@ -6,11 +6,11 @@ NAME := glew32 HOST := i586-mingw32msvc -CC := $(HOST)-gcc -LD := $(HOST)-ld +CC := $(HOST)-gcc -fno-builtin -fno-stack-protector +LD := $(HOST)-ld -nostdlib LN := STRIP := -LDFLAGS.GL = -lopengl32 -lgdi32 -lmsvcrt -luser32 -lkernel32 +LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 WARN = -Wall -W POPT = -O2 BIN.SUFFIX = .exe @@ -19,8 +19,3 @@ LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib LIB.SHARED = $(NAME).dll LIB.STATIC = lib$(NAME).a # the static lib will be broken LDFLAGS.SO = -shared -soname $(LIB.SONAME) --out-implib lib/$(LIB.DEVLNK) -LIB.SONAME.MX = lib$(NAME)mx.dll -LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib -LIB.SHARED.MX = $(NAME)mx.dll -LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken -LDFLAGS.SO.MX = -shared -soname $(LIB.SONAME.MX) --out-implib lib/$(LIB.DEVLNK.MX) diff --git a/config/Makefile.linux-mingw64 b/config/Makefile.linux-mingw64 index c5c386c..439b4e9 100644 --- a/config/Makefile.linux-mingw64 +++ b/config/Makefile.linux-mingw64 @@ -6,11 +6,11 @@ NAME := glew32 HOST := i686-w64-mingw32 -CC := $(HOST)-gcc -LD := $(HOST)-ld +CC := $(HOST)-gcc -fno-builtin -fno-stack-protector +LD := $(HOST)-ld -nostdlib LN := STRIP := -LDFLAGS.GL = -lopengl32 -lgdi32 -lmsvcrt -luser32 -lkernel32 +LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 WARN = -Wall -W POPT = -O2 BIN.SUFFIX = .exe @@ -19,8 +19,3 @@ LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib LIB.SHARED = $(NAME).dll LIB.STATIC = lib$(NAME).a # the static lib will be broken LDFLAGS.SO = -shared -soname $(LIB.SONAME) --out-implib lib/$(LIB.DEVLNK) -LIB.SONAME.MX = lib$(NAME)mx.dll -LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib -LIB.SHARED.MX = $(NAME)mx.dll -LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken -LDFLAGS.SO.MX = -shared -soname $(LIB.SONAME.MX) --out-implib lib/$(LIB.DEVLNK.MX) diff --git a/config/Makefile.mingw b/config/Makefile.mingw index f1fb194..56b5dcc 100644 --- a/config/Makefile.mingw +++ b/config/Makefile.mingw @@ -1,7 +1,7 @@ NAME = glew32 # use gcc for linking, with ld it does not work -CC := gcc -LD := gcc +CC := gcc -fno-builtin -fno-stack-protector +LD := gcc -nostdlib LN := LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 LDFLAGS.EXTRA = -L/mingw/lib @@ -13,8 +13,3 @@ LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib LIB.SHARED = $(NAME).dll LIB.STATIC = lib$(NAME).a # the static lib will be broken LDFLAGS.SO = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK) -LIB.SONAME.MX = lib$(NAME)mx.dll -LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib -LIB.SHARED.MX = $(NAME)mx.dll -LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken -LDFLAGS.SO.MX = -shared -Wl,-soname,$(LIB.SONAME.MX) -Wl,--out-implib,lib/$(LIB.DEVLNK.MX) diff --git a/config/Makefile.msys b/config/Makefile.msys index dfee9c7..f765b0e 100644 --- a/config/Makefile.msys +++ b/config/Makefile.msys @@ -1,7 +1,7 @@ NAME = glew32 # use gcc for linking, with ld it does not work -CC := gcc -LD := gcc +CC := gcc -fno-builtin -fno-stack-protector +LD := gcc -nostdlib LN := CFLAGS.EXTRA += -D_WIN32 LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32