summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xMakefile16
-rwxr-xr-xMakefile.3285
-rw-r--r--SOURCES/make-4.2.tar.bz2bin0 -> 1400539 bytes
3 files changed, 64 insertions, 37 deletions
diff --git a/Makefile b/Makefile
index 968c1e5..264cfd5 100755
--- a/Makefile
+++ b/Makefile
@@ -537,6 +537,7 @@ wingcc-all:
make ARCH=x86-mingw64 wingcc-gendef
make ARCH=x86-mingw64 wingcc-genpeimg
make ARCH=x86-mingw64 wingcc-reimp
+ make ARCH=x86-mingw64 wingcc-gmake
make ARCH=x86-mingw64 wingcc-gdb
make ARCH=x86-mingw64 wingcc-pack
@@ -652,6 +653,21 @@ wingcc-reimp:
cp -f $(BUILD_DIR)/reimp/src/reimp.exe $(WINGCC_INST_DIR)/bin/reimp.exe
cp -f $(BUILD_DIR)/reimp/src/reimp.exe $(WINGCC_INST_DIR)/bin/$(XGCC_TARGET64)-reimp.exe
+wingcc-gmake:
+ rm -Rf $(BUILD_DIR)/make-4.2
+ cd $(BUILD_DIR)/ && \
+ tar -jxf $(SOURCE_DIR)/make-4.2.tar.bz2
+ cd $(BUILD_DIR)/make-4.2 && \
+ export PATH=$(XGCC_BINPATH):$(PATH) && \
+ CC=$(XGCC64) CXX=$(XGPP64) \
+ ./configure \
+ CFLAGS="-I../glob" \
+ --host=$(XGCC_TARGET64) \
+ --prefix=$(WINGCC_INST_DIR) \
+ --host=$(XGCC_TARGET64) && \
+ make && make install
+ cp -f $(WINGCC_INST_DIR)/bin/make.exe $(WINGCC_INST_DIR)/bin/$(XGCC_TARGET64)-make.exe
+
wingcc-genpeimg:
rm -Rf $(BUILD_DIR)/genpeimg
cd $(BUILD_DIR)/ && \
diff --git a/Makefile.32 b/Makefile.32
index 4bc0008..4306756 100755
--- a/Makefile.32
+++ b/Makefile.32
@@ -1,11 +1,11 @@
###################################################################
-# Makefile to generate a GNU GCC compiler (64-Bit) collection
+# Makefile to generate a GNU GCC compiler (32-Bit) collection
#
-# - linux based mingw multilib cross compiler
-# - windows gcc multilib native compiler
-# - linux gcc multilib native compiler
+# - linux based mingw cross compiler
+# - windows gcc native compiler
+# - linux gcc native compiler
#
-# all compiler including GDB 7.12
+# all compiler including GDB
#
# Languages: C, C++, Fortran, Obj-C
# Multilib: -m32, -m64
@@ -48,7 +48,6 @@ ARCH32 = i686-linux-gnu
GCC_PKGVERSION = "TechSAT GCC-Suite v$(VERSION_SUITE)"
-XGCC_TARGET64 = x86_64-w64-mingw32
XGCC_TARGET32 = i686-w64-mingw32
SOURCE_DIR = $(shell readlink -f $(PWD)/SOURCES)
@@ -57,21 +56,17 @@ UNPACK_DIR = $(PWD)/unpack.$(ARCH)
BUILD_DIR = $(PWD)/build.$(ARCH)
INST_BASE = $(PWD)/inst.$(ARCH)
-INST_BASE_LINUX = $(PWD)/inst.x86-linux64
+INST_BASE_LINUX = $(PWD)/inst.x86-linux32
-XGCC_INST_DIR = $(INST_BASE_LINUX)/mingw64
-XGCC_PREFIX = $(XGCC_TARGET64)-
+XGCC_INST_DIR = $(INST_BASE_LINUX)/mingw32
+XGCC_PREFIX = $(XGCC_TARGET32)-
XGCC_BINPATH = $(XGCC_INST_DIR)/bin
XGCC32 = "$(XGCC_BINPATH)/$(XGCC_PREFIX)gcc -m32 -static-libgcc"
-XGCC64 = "$(XGCC_BINPATH)/$(XGCC_PREFIX)gcc -m64 -static-libgcc"
XGPP32 = "$(XGCC_BINPATH)/$(XGCC_PREFIX)g++ -m32 -static-libgcc -static-libstdc++"
-XGPP64 = "$(XGCC_BINPATH)/$(XGCC_PREFIX)g++ -m64 -static-libgcc -static-libstdc++"
GCC_BINPATH = $(INST_BASE)/gcc-$(VERSION_GCC)/bin
GCC32 = "$(GCC_BINPATH)/gcc -static-libgcc"
GXX32 = "$(GCC_BINPATH)/g++ -static-libgcc -static-libstdc++"
-GCC64 = "$(GCC_BINPATH)/gcc -static-libgcc"
-GXX64 = "$(GCC_BINPATH)/g++ -static-libgcc -static-libstdc++"
GCC = "$(GCC_BINPATH)/gcc -static-libgcc"
GXX = "$(GCC_BINPATH)/g++ -static-libgcc -static-libstdc++"
@@ -139,13 +134,13 @@ all: \
fullclean
ifneq ($(LOCAL_INST_PATH),)
mkdir -p $(LOCAL_INST_PATH)
- mkdir -p $(LOCAL_INST_PATH)/../x86-mingw64
+ mkdir -p $(LOCAL_INST_PATH)/../x86-mingw32
cd $(LOCAL_INST_PATH); \
- tar -zxf $(PWD)/gcc-suite-$(VERSION_SUITE)-gcc-$(VERSION_GCC)-x86-linux64.tgz
+ tar -zxf $(PWD)/gcc-suite-$(VERSION_SUITE)-gcc-$(VERSION_GCC)-x86-linux.tgz
cd $(LOCAL_INST_PATH); \
- tar -zxf $(PWD)/gcc-suite-$(VERSION_SUITE)-xgcc-$(VERSION_GCC)-$(VERSION_MINGW)-x86-linux64.tgz
- cd $(LOCAL_INST_PATH)/../x86-mingw64; \
- unzip -o $(PWD)/gcc-suite-$(VERSION_SUITE)-gcc-$(VERSION_GCC)-$(VERSION_MINGW)-x86-mingw64.zip
+ tar -zxf $(PWD)/gcc-suite-$(VERSION_SUITE)-xgcc-$(VERSION_GCC)-$(VERSION_MINGW)-x86-linux.tgz
+ cd $(LOCAL_INST_PATH)/../x86-mingw32; \
+ unzip -o $(PWD)/gcc-suite-$(VERSION_SUITE)-gcc-$(VERSION_GCC)-$(VERSION_MINGW)-x86-mingw.zip
endif
prepare:
@@ -180,7 +175,7 @@ build-common:
mkdir -p $(BUILD_DIR)
##############################################################################
-# Nativ Multilib Linux Compiler (64 -Bit)
+# Nativ Linux Compiler (32 -Bit)
##############################################################################
lingcc-all:
make -f Makefile.32 ARCH=x86-linux clean
@@ -263,20 +258,20 @@ lingcc-gdb:
mkdir -p $(BUILD_DIR)/lingdb
cd $(BUILD_DIR)/lingdb && \
export PATH=$(INST_BASE)/gcc-$(VERSION_GCC)/bin:$(PATH) && \
- CFLAGS="-g -O2" \
+ CFLAGS="-m32 -g -O2" \
LDLAGS="-static-libgcc -static-libstdc++" \
CXXFLAGS="-g -O2 -fpermissive" \
$(UNPACK_DIR)/gdb-$(VERSION_GDB)/configure \
--prefix=$(INST_BASE)/gcc-$(VERSION_GCC) \
- --target=$(ARCH64) \
- --host=$(ARCH64) \
+ --target=$(ARCH32) \
+ --host=$(ARCH32) \
--build=$(ARCH64) && \
make $(JOBS) && make $(JOBS) install
lingcc-pack:
rm -Rf $(INST_BASE)/gcc$(VERSION_GCC)/share
cd $(INST_BASE) && \
- tar -zcf $(PWD)/gcc-suite-$(VERSION_SUITE)-gcc-$(VERSION_GCC)-x86-linux64.tgz ./gcc-$(VERSION_GCC)
+ tar -zcf $(PWD)/gcc-suite-$(VERSION_SUITE)-gcc-$(VERSION_GCC)-x86-linux.tgz ./gcc-$(VERSION_GCC)
##############################################################################
@@ -394,7 +389,7 @@ xgcc-gcc-pass2:
xgcc-finish:
cd $(XGCC_INST_DIR) && rm -f mingw
for f in `find $(XGCC_INST_DIR) -type f -executable -exec file -i '{}' \; | grep 'x-executable; charset=binary' | cut -d: -f1`; do \
- $(XGCC_INST_DIR)/bin/$(XGCC_TARGET64)-strip $$f ;\
+ $(XGCC_INST_DIR)/bin/$(XGCC_TARGET32)-strip $$f ;\
done;
rm -Rf $(XGCC_INST_DIR)/share
find $(XGCC_INST_DIR) -type f -name "*.py" | xargs rm -f
@@ -403,8 +398,8 @@ xgcc-finish:
cp -f $(SOURCE_DIR)/dll2a \
$(XGCC_INST_DIR)/bin/$(XGCC_TARGET32)-dll2a
chmod a+x $(XGCC_INST_DIR)/bin/$(XGCC_TARGET32)-dll2a
- sed -i -e 's/__LIB64__/lib\/gcc\/$(XGCC_TARGET32)\/lib/g' \
- $(XGCC_INST_DIR)/lib/gcc/$(XGCC_TARGET32)/$(VERSION_GCC)/specs
+ #sed -i -e 's/__LIB64__/lib\/gcc\/$(XGCC_TARGET32)\/lib/g' \
+ # $(XGCC_INST_DIR)/lib/gcc/$(XGCC_TARGET32)/$(VERSION_GCC)/specs
cat $(XGCC_INST_DIR)/lib/gcc/$(XGCC_TARGET32)/$(VERSION_GCC)/specs \
$(SOURCE_DIR)/gcc.msvcr90.spec > \
$(XGCC_INST_DIR)/lib/gcc/$(XGCC_TARGET32)/$(VERSION_GCC)/msvcr90
@@ -461,7 +456,7 @@ xgcc-gendef:
LDLAGS="-static-libgcc" \
./configure && \
make
- cp -f $(BUILD_DIR)/gendef/gendef $(XGCC_INST_DIR)/bin/$(XGCC_TARGET64)-gendef
+ cp -f $(BUILD_DIR)/gendef/gendef $(XGCC_INST_DIR)/bin/$(XGCC_TARGET32)-gendef
xgcc-zlib:
mkdir -p $(BUILD_DIR)
@@ -483,11 +478,11 @@ xgcc-zlib:
AR=$(XGCC_BINPATH)/$(XGCC_PREFIX)ar \
RANLIB=$(XGCC_BINPATH)/$(XGCC_PREFIX)ranlib \
./configure \
- --prefix=$(XGCC_INST_DIR)/$(XGCC_TARGET64) --static && \
+ --prefix=$(XGCC_INST_DIR)/$(XGCC_TARGET32) --static && \
make clean && make
cd $(BUILD_DIR)/zlib-$(VERSION_ZLIB) && \
- cp -f libz.a $(XGCC_INST_DIR)/$(XGCC_TARGET64)/lib32 && \
- chmod 644 $(XGCC_INST_DIR)/$(XGCC_TARGET64)/lib32/libz.a
+ cp -f libz.a $(XGCC_INST_DIR)/$(XGCC_TARGET32)/lib32 && \
+ chmod 644 $(XGCC_INST_DIR)/$(XGCC_TARGET32)/lib32/libz.a
xgcc-bzip2:
mkdir -p $(BUILD_DIR)
@@ -498,15 +493,15 @@ xgcc-bzip2:
PREFIX=$(XGCC_INST_DIR)/$(XGCC_TARGET32) clean libbz2.a
cd $(UNPACK_DIR)/bzip2-$(VERSION_BZ2) && \
cp -f libbz2.a $(XGCC_INST_DIR)/$(XGCC_TARGET32)/lib
- chmod 644 $(XGCC_INST_DIR)/$(XGCC_TARGET64)/lib/libbz2.a
+ chmod 644 $(XGCC_INST_DIR)/$(XGCC_TARGET32)/lib/libbz2.a
xgcc-pack:
rm -Rf $(XGCC_INST_DIR)/share
cd $(INST_BASE_LINUX) && \
- tar -zcf $(PWD)/gcc-suite-$(VERSION_SUITE)-xgcc-$(VERSION_GCC)-$(VERSION_MINGW)-x86-linux.tgz ./mingw64
+ tar -zcf $(PWD)/gcc-suite-$(VERSION_SUITE)-xgcc-$(VERSION_GCC)-$(VERSION_MINGW)-$(ARCH).tgz ./mingw32
##############################################################################
-# Nativ Multilib Windows Compiler (64 -Bit)
+# Nativ Windows Compiler (32 -Bit)
##############################################################################
wingcc-all:
make ARCH=x86-mingw64 clean
@@ -561,7 +556,7 @@ wingcc-mingw:
--enable-lib32 && \
make $(JOBS) && \
make $(JOBS) install
- cd $(WINGCC_INST_DIR) && rm -f mingw && ln -s $(XGCC_TARGET64) mingw
+ cd $(WINGCC_INST_DIR) && rm -f mingw && ln -s $(XGCC_TARGET32) mingw
wingcc-gcc:
rm -Rf $(BUILD_DIR)/gcc && mkdir -p $(BUILD_DIR)/gcc
@@ -610,8 +605,8 @@ wingcc-finish:
#
cp -f $(SOURCE_DIR)/mingw.gcc.specs \
$(WINGCC_INST_DIR)/lib/gcc/$(XGCC_TARGET32)/$(VERSION_GCC)/specs
- sed -i -e 's/__LIB64__/lib\/gcc\/$(XGCC_TARGET32)\/lib/g' \
- $(WINGCC_INST_DIR)/lib/gcc/$(XGCC_TARGET32)/$(VERSION_GCC)/specs
+ #sed -i -e 's/__LIB64__/lib\/gcc\/$(XGCC_TARGET32)\/lib/g' \
+ # $(WINGCC_INST_DIR)/lib/gcc/$(XGCC_TARGET32)/$(VERSION_GCC)/specs
cat $(WINGCC_INST_DIR)/lib/gcc/$(XGCC_TARGET32)/$(VERSION_GCC)/specs \
$(SOURCE_DIR)/gcc.msvcr90.spec > \
$(WINGCC_INST_DIR)/lib/gcc/$(XGCC_TARGET32)/$(VERSION_GCC)/msvcr90
@@ -632,6 +627,22 @@ wingcc-reimp:
cp -f $(BUILD_DIR)/reimp/src/reimp.exe $(WINGCC_INST_DIR)/bin/reimp.exe
cp -f $(BUILD_DIR)/reimp/src/reimp.exe $(WINGCC_INST_DIR)/bin/$(XGCC_TARGET32)-reimp.exe
+wingcc-gmake:
+ rm -Rf $(BUILD_DIR)/make-4.2
+ cd $(BUILD_DIR)/ && \
+ tar -jxf $(SOURCE_DIR)/make-4.2.tar.bz2
+ cd $(BUILD_DIR)/make-4.2 && \
+ export PATH=$(XGCC_BINPATH):$(PATH) && \
+ CC=$(XGCC32) CXX=$(XGPP32) \
+ ./configure \
+ CFLAGS="-I../glob" \
+ --host=$(XGCC_TARGET32) \
+ --prefix=$(WINGCC_INST_DIR) \
+ --host=$(XGCC_TARGET32) && \
+ make && make install
+ cp -f $(WINGCC_INST_DIR)/bin/make.exe $(WINGCC_INST_DIR)/bin/$(XGCC_TARGET32)-make.exe
+
+
wingcc-genpeimg:
rm -Rf $(BUILD_DIR)/genpeimg
cd $(BUILD_DIR)/ && \
@@ -687,7 +698,7 @@ wingcc-bzip2:
export PATH=$(XGCC_BINPATH)/bin:$(PATH) && \
make \
CC=$(XGCC32) \
- PREFIX=$(WINGCC_INST_DIR)/$(XGCC_TARGET64) libbz2.a
+ PREFIX=$(WINGCC_INST_DIR)/$(XGCC_TARGET32) libbz2.a
cd $(UNPACK_DIR)/bzip2-$(VERSION_BZ2) && \
cp -f libbz2.a $(WINGCC_INST_DIR)/$(XGCC_TARGET32)/lib32
chmod 644 $(WINGCC_INST_DIR)/$(XGCC_TARGET32)/lib/libbz2.a
diff --git a/SOURCES/make-4.2.tar.bz2 b/SOURCES/make-4.2.tar.bz2
new file mode 100644
index 0000000..ff5dd4b
--- /dev/null
+++ b/SOURCES/make-4.2.tar.bz2
Binary files differ