#!/bin/sh ################################################################################ # This file is part of OpenELEC - http://www.openelec.tv # Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) # # This Program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This Program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with OpenELEC.tv; see the file COPYING. If not, write to # the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. # http://www.gnu.org/copyleft/gpl.html ################################################################################ . config/options $1 if [ "$LINUX" = AMLm1 -o "$LINUX" = AMLm3 ]; then KERNEL_VER="2.6.34" else KERNEL_VER="3.0.0" fi # Fails to compile with GCC's link time optimization. strip_lto # eglibc dont support GOLD linker. strip_gold # Filter out some problematic *FLAGS CFLAGS=`echo $CFLAGS | sed -e "s|-ffast-math||g"` CFLAGS=`echo $CFLAGS | sed -e "s|-Ofast|-O2|g"` CFLAGS=`echo $CFLAGS | sed -e "s|-O.|-O2|g"` LDFLAGS=`echo $LDFLAGS | sed -e "s|-ffast-math||g"` LDFLAGS=`echo $LDFLAGS | sed -e "s|-Ofast|-O2|g"` LDFLAGS=`echo $LDFLAGS | sed -e "s|-O.|-O2|g"` LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"` unset LD_LIBRARY_PATH # set some CFLAGS we need CFLAGS="$CFLAGS -g -fno-stack-protector -fgnu89-inline" # dont build parallel MAKEFLAGS=-j1 export BUILD_CC=$HOST_CC export OBJDUMP_FOR_HOST=objdump if [ "$DEBUG" = yes ]; then DEBUG_CONFIG="--enable-debug" else DEBUG_CONFIG="--disable-debug" DEBUG_OPTIONS=" OPTION_EGLIBC_MEMUSAGE = n" fi NSS_CONF_DIR=`ls -d $ROOT/$BUILD/eglibc*/nss` cd $PKG_BUILD aclocal --force --verbose autoconf-2.68 --force --verbose mkdir -p objdir-$1 && cd objdir-$1 # OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG = $NSS_CONF_DIR/fixed-nsswitch.conf # OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS = $NSS_CONF_DIR/fixed-nsswitch.functions cat >option-groups.config <config.cache <configparms <