]> git.pld-linux.org Git - packages/kBuild.git/commitdiff
x32 build fixes auto/th/kBuild-0.1.9998.2700-3
authorElan Ruusamäe <glen@delfi.ee>
Mon, 23 Mar 2015 20:22:25 +0000 (20:22 +0000)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 23 Mar 2015 20:22:35 +0000 (20:22 +0000)
kBuild.spec
x32.patch [new file with mode: 0644]

index adc5385ce0482b72d26b622ccc1d465ee31f7b0e..3ffb42a3a7b0ca7b148f770574f56937edc4b153 100644 (file)
@@ -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@_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 (file)
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'
+             ;;
This page took 0.397171 seconds and 4 git commands to generate.