Browse Source

fake:


			
			
				rocklinux
			
			
		
fake 20 years ago
parent
commit
869e50d47c
2 changed files with 35 additions and 6 deletions
  1. +24
    -6
      package/base/glibc/glibc.conf
  2. +11
    -0
      package/base/glibc/glibc23/no-mabi-mips64.cross.diff

+ 24
- 6
package/base/glibc/glibc.conf

@ -249,6 +249,30 @@ glibc_prepatch() {
glibc_stage0() {
if [ $pkg_glibc_version = 23 ]
then
# .cross patches don't get applied automagically if we build a -cross- pkg
# maybe add $confdir/glibc23/*.patch.${pkg_glibc_cross:0:3} to the for loop ?
if [ -n "$pkg_glibc_cross" ] ; then
for i in $confdir/glibc23/*.patch.cross
do
echo "Applying patch $i..."
patch -p1 < $i ;
done
fi
# for mips*, tries to add -mabi. for headers, we don't have a compiler allowing that yet
# if cross-compiling. the values of _MIPS_SIM can be found in sysdeps/mips/sgidefs.h
if [ \( $arch = mips -a $crossnative = cross \) -o -n "$pkg_glibc_cross" ] ; then
patch -p1 < $confdir/glibc23/no-mabi-mips64.cross.diff
mv sysdeps/mips/mips32/Makefile sysdeps/mips/mips32/Makefile-x
echo "CC += -D_MIPS_SZPTR=32 -D_MIPS_SIM=1" > sysdeps/mips/mips32/Makefile
mv sysdeps/mips/mips64/n32/Makefile sysdeps/mips/mips64/n32/Makefile-x
echo "CC += -D_MIPS_SZPTR=64 -D_MIPS_SIM=2" > sysdeps/mips/mips64/n32/Makefile
echo "long-double-fcts = yes" >> sysdeps/mips/mips64/n32/Makefile
mv sysdeps/mips/mips64/n64/Makefile sysdeps/mips/mips64/n64/Makefile-x
echo "CC += -D_MIPS_SZPTR=64 -D_MIPS_SIM=3" > sysdeps/mips/mips64/n64/Makefile
echo "long-double-fcts = yes" >> sysdeps/mips/mips64/n64/Makefile
fi
mkdir -p objdir; cd objdir
confopt="${confopt% --target=*}"
@ -261,12 +285,6 @@ glibc_stage0() {
eval "../configure --enable-add-ons"$ADDONS" $confopt"
# mips install-headers is broken - it passes -mabi={32,64} to the host compiler
if [ $arch = mips -a $crossnative = cross ] ; then
mv ../sysdeps/mips/mips32/Makefile ../sysdeps/mips/mips32/Makefile-x
echo "CC += -D_MIPS_SZPTR=32" > ../sysdeps/mips/mips32/Makefile
fi
make -k cross-compiling=yes install-headers || true
cp -v ../include/features.h $root/$prefix/include
fi

+ 11
- 0
package/base/glibc/glibc23/no-mabi-mips64.cross.diff

@ -0,0 +1,11 @@
--- ./configure.orig 2004-09-18 07:23:18.600218296 +0200
+++ ./configure 2004-09-18 07:23:36.692467856 +0200
@@ -1909,7 +1909,7 @@
if test $mips_config_abi != $mips_cc_abi; then
# This won't make it to config.make, but we want to
# set this in case configure tests depend on it.
- CPPFLAGS="$CPPFLAGS -mabi=$mips_config_abi"
+ echo "i am not setting -mabi as you are crosscompiling headers."
fi
;;
mips*) base_machine=mips machine=mips/mips32/$machine ;;

Loading…
Cancel
Save