[packages/kBuild] x32 build fixes
glen
glen at pld-linux.org
Mon Mar 23 21:22:48 CET 2015
commit 1a03cdc2b6212a8083f7b70daf118614dcb82d3d
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Mar 23 20:22:25 2015 +0000
x32 build fixes
kBuild.spec | 13 +++++++++++--
x32.patch | 12 ++++++++++++
2 files changed, 23 insertions(+), 2 deletions(-)
---
diff --git a/kBuild.spec b/kBuild.spec
index adc5385..3ffb42a 100644
--- a/kBuild.spec
+++ b/kBuild.spec
@@ -8,7 +8,7 @@
Summary: A cross-platform build environment
Name: kBuild
Version: %{ver}.%{svnrev}
-Release: 2
+Release: 3
Group: Development/Tools
# Most tools are from NetBSD, some are from FreeBSD, and make and sed are from GNU
License: BSD and GPL v2+
@@ -19,6 +19,7 @@ Patch0: %{name}-0.1.3-escape.patch
Patch1: %{name}-0.1.5-dprintf.patch
Patch2: %{name}-0.1.5-pthread.patch
Patch3: re_string_fetch_byte_case-not-pure-attribute.patch
+Patch4: x32.patch
URL: http://svn.netlabs.org/kbuild
BuildRequires: acl-devel
BuildRequires: byacc
@@ -34,7 +35,7 @@ BuildRequires: kBuild
%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%ifarch %{x8664}
+%ifarch %{x8664} x32
%define kbuild_arch amd64
%else
%define kbuild_arch x86
@@ -63,6 +64,7 @@ mv %{name} .tmp; mv .tmp/* .
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
cat > SvnInfo.kmk << EOF
KBUILD_SVN_REV := %{svnrev}
@@ -71,6 +73,13 @@ EOF
%{__sed} -i -e 's at _LDFLAGS\.%{kbuild_arch}*.*=@& %{rpmldflags}@g' Config.kmk
+%ifarch x32
+# probably should add full x32 configuration
+# but can't find place to submit code upstream, so this will do for now.
+# but then again, forcing -m64 is bad and pointless
+sed -i -e 's/-m64//' kBuild/tools/GCC64.kmk kBuild/tools/GXX64.kmk tests/Config.kmk Config.kmk
+%endif
+
%build
%define bootstrap_mflags %{?_smp_mflags} %{?with_verbose:KBUILD_VERBOSE=2} \\\
CC="%{__cc}" TOOL_GCC3_CC="%{__cc}" CFLAGS="%{rpmcflags}"
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..332338b
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,12 @@
+--- kBuild-0.1.9998.2700/kBuild/env.sh 2015-03-23 19:32:23.858751190 +0000
++++ kBuild-0.1.9998.2780/kBuild/env.sh 2015-03-23 19:26:51.504892609 +0000
+@@ -326,6 +326,9 @@
+ x86_64|AMD64|amd64|k8|k8l|k9|k10)
+ KBUILD_HOST_ARCH='amd64'
+ ;;
++ x32)
++ KBUILD_HOST_ARCH='x32'
++ ;;
+ x86|i86pc|ia32|i[3456789]86|BePC)
+ KBUILD_HOST_ARCH='x86'
+ ;;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/kBuild.git/commitdiff/1a03cdc2b6212a8083f7b70daf118614dcb82d3d
More information about the pld-cvs-commit
mailing list