# Most of these patches are from crosstool-NG and some of them are needed to fix build issues PATCH_LIST=" dont-use-soname-armhf.diff disable-stack-protector.diff 999-fix-sched_setaffinity.patch " #stdio_h-undefgets.patch FILE_LIST= SRC_FETCH_PATH="http://ftp.gnu.org/gnu/glibc/glibc-${PKGVER}.tar.bz2" SRC_FETCH_METHOD="http" function do_config { local ret fp rm -rf build mkdir -p build/ cd build/ case "$FLX_FLOAT" in none) fp="--without-fp" ;; soft) fp="--with-fp --with-float=soft" ;; softfp) fp="--with-fp --with-float=softfp" ;; hard) fp="--with-fp" ;; *) fp="--with-fp" ;; esac #opt="${GCC_OPT_SMALL//-malign-functions=0/}" #--cache-file=config.cache \ if echo -- "$GCC_CPU_COMMON" | \grep -qe x86.64; then GCC_CPU_COMMON="-mtune=k8" lfix="libc_cv_x86_64_tls=yes" fi #echo "GCC_CPU_COMMON=$GCC_CPU_COMMON GCC_ARCH_COMMON=$GCC_ARCH_COMMON cfix=$cfix lfix=$lfix" BUILD_CC=$HOSTCC \ CFLAGS="$GCC_CPU_COMMON $GCC_ARCH_COMMON ${GCC_OPT_FAST//-fno-align-jumps/} -U_FORTIFY_SOURCE" \ CC="$CC" AR="$AR" RANLIB="$RANLIB" \ LD_LIBRARY_PATH="" \ BASH_SHELL="/bin/bash" KSH="/bin/bash" \ ../configure --prefix=/usr --build=$FLXHOST \ --enable-obsolete-rpc \ --host=$FLXTARG --without-cvs \ --disable-profile --disable-debug --without-gd \ --disable-sanity-checks \ --with-headers=$FLXROOTDIR/usr/include --with-__thread \ --enable-shared --with-tls $fp \ --enable-kernel=2.6.32 \ --enable-add-ons=nptl,ports \ --disable-multi-arch \ libc_cv_cc_sse4=no libc_cv_cc_fma4=no \ libc_cv_cc_avx=no libc_cv_cc_sse2avx=no $lfix ret=$? cd .. return $ret } function do_compile_only { local ret mkdir -p build/ cd build # $FLXPMAKE => ne termine pas. $FLXMAKE SHELL=/bin/bash ret=$? cd .. return $ret } function do_clean { rm -fr build } function do_prepack { mkdir -p $ROOTDIR/etc && touch $ROOTDIR/etc/ld.so.conf cd build/ $FLXMAKE install install_root=$ROOTDIR prefix=/usr slibdir=/lib \ libdir=/usr/lib libexecdir=/usr/bin rm -f $ROOTDIR/etc/ld.so.cache $ROOTDIR/etc/ld.so.conf rm -f $ROOTDIR/etc/localtime ( cd $ROOTDIR/usr/share/zoneinfo find . -links "+1" -type "f" -exec '/bin/bash' '-c' 'cp --preserve {} {}.dereference.hard; rm -f {}; cp --preserve {}.dereference.hard {}; rm -f {}.dereference.hard' \; ) chmod -w $ROOTDIR/usr/bin/pt_chown if [ "$FLX_BITS" = 64 ] ; then ln -s lib $ROOTDIR/usr/lib64 ln -s lib $ROOTDIR/lib64 fi set_default_perm $ROOTDIR cd .. } function pre_pack { chmod +w $ROOTDIR/sbin/{ldconfig,sln} ${SSTRIP} $ROOTDIR/sbin/{ldconfig,sln} || : chmod -w $ROOTDIR/sbin/{ldconfig,sln} }