|
|
@ -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 |
|
|
|