Browse Source

port OpenADK to a Debian/x32 host

Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Thorsten Glaser 9 years ago
parent
commit
0017dca1c1
2 changed files with 8 additions and 2 deletions
  1. 3 1
      Makefile
  2. 5 1
      toolchain/gmp/Makefile

+ 3 - 1
Makefile

@@ -191,7 +191,9 @@ NO_ERROR=0
 		echo "GMAKE:=$$(which gmake)" >>prereq.mk ;\
 	fi
 	@echo "GNU_HOST_NAME:=$$(${CC} -dumpmachine)" >>prereq.mk
-	@echo "ARCH_FOR_BUILD:=$$(${CC} -dumpmachine | sed -e s'/-.*//' \
+	@echo "ARCH_FOR_BUILD:=$$(${CC} -dumpmachine | sed \
+	    -e 's/x86_64-linux-gnux32/x32/' \
+	    -e s'/-.*//' \
 	    -e 's/sparc.*/sparc/' \
 	    -e 's/armeb.*/armeb/g' \
 	    -e 's/arm.*/arm/g' \

+ 5 - 1
toolchain/gmp/Makefile

@@ -10,6 +10,10 @@ ifeq (${ADK_MAKE_PARALLEL},y)
 GMP_MAKEOPTS+=		-j${ADK_MAKE_JOBS}
 endif
 
+ifeq (${ARCH_FOR_BUILD},x32)
+GMP_CONFOPTS+=		ABI=x32
+endif
+
 $(WRKBUILD)/.headers:
 $(WRKBUILD)/.configured:
 ifneq ($(OStype),Darwin)
@@ -17,7 +21,7 @@ ifneq ($(OStype),Darwin)
 endif
 	(cd $(WRKBUILD); \
 		PATH="$(STAGING_HOST_DIR)/usr/bin:$$PATH" \
-		./configure \
+		./configure ${GMP_CONFOPTS} \
 		--prefix=$(STAGING_HOST_DIR)/usr \
 		--with-pic \
 		--disable-shared \