Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2011-09-26 23:25:52 +0200
committerMichal Marek <mmarek@suse.cz>2011-09-26 23:25:52 +0200
commit83dbeeeef6daafba2b0b345028a450ff9995ec3e (patch)
tree930d84fe5b410ee4aea7a70527f76fdb3c9f299c
parent7de39e8cc926c7fd2b56d606253c208b83ec71bc (diff)
parent1de23845d6d1cd38763d9d9b6121c51925c61035 (diff)
Merge branch 'host-memcpy-hack'
-rw-r--r--rpm/host-memcpy-hack.h7
-rw-r--r--rpm/kernel-binary.spec.in28
-rw-r--r--rpm/kernel-source.spec.in1
3 files changed, 23 insertions, 13 deletions
diff --git a/rpm/host-memcpy-hack.h b/rpm/host-memcpy-hack.h
new file mode 100644
index 0000000000..28b9baa055
--- /dev/null
+++ b/rpm/host-memcpy-hack.h
@@ -0,0 +1,7 @@
+#ifdef __x86_64__
+/*
+ * Force the linker to use the older memcpy variant, so that the user programs
+ * work on older systems
+ */
+__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
+#endif
diff --git a/rpm/kernel-binary.spec.in b/rpm/kernel-binary.spec.in
index c1d46b30c2..e38d92f67f 100644
--- a/rpm/kernel-binary.spec.in
+++ b/rpm/kernel-binary.spec.in
@@ -217,6 +217,21 @@ cd linux-%srcversion
cd %kernel_build_dir
+# Override the timestamp 'uname -v' reports with the source timestamp and
+# the commit hash.
+date=$(head -n 1 %_sourcedir/source-timestamp)
+commit=$(sed -n 's/GIT Revision: //p' %_sourcedir/source-timestamp)
+cat > .kernel-binary.spec.buildenv <<EOF
+export KBUILD_BUILD_TIMESTAMP="$(LANG=C date -d "$date") (${commit:0:7})"
+export KBUILD_VERBOSE=0
+export KBUILD_SYMTYPES=1
+export KBUILD_OVERRIDE=1
+export KBUILD_BUILD_USER=geeko
+export KBUILD_BUILD_HOST=buildhost
+export HOST_EXTRACFLAGS="-include %_sourcedir/host-memcpy-hack.h"
+EOF
+source .kernel-binary.spec.buildenv
+
if [ -f %_sourcedir/localversion ] ; then
cat %_sourcedir/localversion > localversion
fi
@@ -262,19 +277,6 @@ make clean $MAKE_ARGS
rm -f source
find . ! -type d -printf '%%P\n' > %my_builddir/obj-files
-# Override the timestamp 'uname -v' reports with the source timestamp and
-# the commit hash.
-date=$(head -n 1 %_sourcedir/source-timestamp)
-commit=$(sed -n 's/GIT Revision: //p' %_sourcedir/source-timestamp)
-cat > .kernel-binary.spec.buildenv <<EOF
-export KBUILD_BUILD_TIMESTAMP="$(LANG=C date -d "$date") (${commit:0:7})"
-export KBUILD_VERBOSE=0
-export KBUILD_SYMTYPES=1
-export KBUILD_OVERRIDE=1
-export KBUILD_BUILD_USER=geeko
-export KBUILD_BUILD_HOST=buildhost
-EOF
-
%build
cd %kernel_build_dir
source .kernel-binary.spec.buildenv
diff --git a/rpm/kernel-source.spec.in b/rpm/kernel-source.spec.in
index 1156d2ae61..26ead99533 100644
--- a/rpm/kernel-source.spec.in
+++ b/rpm/kernel-source.spec.in
@@ -86,6 +86,7 @@ Source64: package-descriptions
Source65: kernel-spec-macros
Source66: configtool.pl
Source67: log.sh
+Source68: host-memcpy-hack.h
Source100: config.tar.bz2
Source101: config.addon.tar.bz2
Source102: patches.arch.tar.bz2