|
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
|
|
#
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
# Please add additional copyright information _after_ the line containing
|
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
|
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
|
|
#
|
|
# ROCK Linux: rock-src/package/base/dietlibc/parse-config-9
|
|
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
|
|
#
|
|
# 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 of the License, or
|
|
# (at your option) any later version. A copy of the GNU General Public
|
|
# License can be found at Documentation/COPYING.
|
|
#
|
|
# Many people helped and are helping developing ROCK Linux. Please
|
|
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
|
|
# file for details.
|
|
#
|
|
# --- ROCK-COPYRIGHT-NOTE-END ---
|
|
|
|
if [ "$ROCKCFG_DIETLIBC_ALL" = 1 -o "$pkg" = "dietlibc" ]; then
|
|
pkg_dietlibc_useit=1
|
|
else
|
|
x="${pkg//-/_}" ; x="${x//+/_}"
|
|
eval "pkg_dietlibc_useit=\$ROCKCFG_DIETLIBC_${x}"
|
|
fi
|
|
[ "$pkg_dietlibc_useit" != 1 ] && pkg_dietlibc_useit=0
|
|
[ "$stagelevel" -eq 0 ] && pkg_dietlibc_useit=0
|
|
|
|
if [ "$pkg_dietlibc_useit" = 1 ]; then
|
|
|
|
# If we use something like 'i386-pc-linux-gnu' as architecture name,
|
|
# some programs start using gnu extensions. So we use ..-gnulibc1
|
|
# instead.
|
|
#
|
|
pkg_dietlibc_orig_target="$arch_target"
|
|
arch_target="${arch_target}libc1"
|
|
[ $ROCKCFG_CROSSBUILD = 0 ] && arch_build="${arch_target}"
|
|
|
|
if [ -d $base/build/$ROCKCFG_ID/$toolsdir/diet-bin ] ; then
|
|
PATH="$base/build/$ROCKCFG_ID/$toolsdir/diet-bin:$PATH"
|
|
fi
|
|
|
|
if [ "$ROCKCFG_DIETLIBC_DYN" = "1" ]
|
|
then dietbin="diet-dyn" ; x="dynamically"
|
|
else dietbin="diet" ; x="statically" ; fi
|
|
|
|
echo_status "Preparing configuration to build this package with dietlibc ($x)."
|
|
|
|
if [ "$stagelevel" -le 1 ]; then
|
|
# all dietlibc pathes are redirected into the build system
|
|
var_insert CC_WRAPPER_FILTER "|" "sed -e 's,/usr/dietlibc/,$root&,'"
|
|
# else
|
|
# var_remove CC_WRAPPER_INSERT " " "-pipe" ;
|
|
# var_append CC_WRAPPER_REMOVE " " "-pipe" ;
|
|
|
|
# var_remove GCC_WRAPPER_INSERT " " "-pipe" ;
|
|
# var_append GCC_WRAPPER_REMOVE " " "-pipe" ;
|
|
|
|
# patchopt="-bf -p1 -x 16 -z .orig" ;
|
|
# var_append CC_WRAPPER_INSERT " " "-L/usr/i386-pc-linux-gnulibc1/lib"
|
|
fi
|
|
|
|
# use dietlibc headers instead of system defaults
|
|
var_append CC_WRAPPER_INSERT " " "-nostdinc"
|
|
|
|
case "$pkg" in
|
|
dietlibc)
|
|
echo_status "This package does not utilize a C library ..."
|
|
;;
|
|
|
|
linux*)
|
|
echo_status "This package is currently blacklisted and not build using dietlibc!"
|
|
;;
|
|
|
|
util-linux|e2fsprogs|net-tools) # the packets that have BSD problems and/or GNU problems
|
|
echo_status "Setting dietlibc special GNU/BSD settings!"
|
|
var_append CC_WRAPPER_INSERT " " "-D_BSD_SOURCE"
|
|
var_append CC_WRAPPER_INSERT " " "-D_GNU_SOURCE"
|
|
var_append CC_WRAPPER_OTHERS ":" $dietbin
|
|
;;
|
|
|
|
sed)
|
|
echo_status "Setting dietlibc special lcompat settings!"
|
|
var_append CC_WRAPPER_APPEND_PO " " "-lcompat"
|
|
var_append CC_WRAPPER_OTHERS ":" $dietbin
|
|
;;
|
|
|
|
coreutils)
|
|
echo_status "Setting dietlibc special lcompat+BSD settings!"
|
|
var_append CC_WRAPPER_APPEND_PO " " "-lcompat"
|
|
var_append CC_WRAPPER_INSERT " " "-D_BSD_SOURCE"
|
|
var_append CC_WRAPPER_OTHERS ":" $dietbin
|
|
;;
|
|
|
|
iproute2)
|
|
echo_status "Allowing default headers from /usr/include!"
|
|
var_append CC_WRAPPER_OTHERS ":" $dietbin
|
|
|
|
# needs to be last since otherwise the (g)libc headers
|
|
# in /usr/include would be used instead of the dietlibc
|
|
# ones ... - so append instead insert.
|
|
var_append CC_WRAPPER_APPEND " " "-I$root/usr/include"
|
|
var_append CC_WRAPPER_INSERT " " "-I/usr/dietlibc/include"
|
|
;;
|
|
|
|
*)
|
|
echo_status "Using default dietlibc compiler options!"
|
|
var_append CC_WRAPPER_OTHERS ":" $dietbin
|
|
;;
|
|
esac
|
|
|
|
case "$pkg" in
|
|
coreutils)
|
|
var_remove patchfiles " " "*acl-xattr.patch"
|
|
;;
|
|
esac
|
|
|
|
var_append patchfiles " " `ls $base/package/base/dietlibc/pkg_patch/pkg_$pkg.patch 2>/dev/null`
|
|
fi
|
|
|