1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007, 2008, 2009 Michael Tremer & Christian Schmidt #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
19 ###############################################################################
21 ###############################################################################
23 ###############################################################################
27 PKG_NAME = test-toolchain
33 ifeq "$(STAGE)" "toolchain"
34 OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)-pass$(PASS)
36 OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
47 SHORT_DESC = This script does some sanity checks on the toolchain.
50 This script does some sanity checks on the toolchain.
53 ###############################################################################
55 ###############################################################################
72 ###############################################################################
73 # Installation Details
74 ###############################################################################
79 ifeq "$(STAGE)" "toolchain"
82 echo 'main(){}' | $(IFS_TARGET)-gcc -B $(TOOLS_DIR)/lib/ -x c - -lrt
83 cd $(DIR_TMP) && readelf -l a.out | grep ": $(TOOLS_DIR)"
87 # Sanity check - ensure host not being searched for libs
89 echo 'main(){}' | cc -x c -lbogus -v -Wl,--verbose - &> foo || :
90 cd $(DIR_TMP) && if grep "^attempt to open /usr" foo; then \
96 ifeq "$(STAGE)" "base"
99 echo 'main(){}' | cc -x c -specs=$$(dirname $$(gcc --print-libgcc-file-name))/myspecs \
100 -B/usr/lib/ -B/usr/bin/ -Wl,--verbose - -lrt &> foo
102 cd $(DIR_TMP) && readelf -l a.out | grep ": /lib"
105 cd $(DIR_TMP) && grep " /usr/lib/Scrt1.o succ" foo
108 cd $(DIR_TMP) && grep " /lib.*libc.so.6 succ" foo
110 # 4. deps found from DT_NEEDED
111 cd $(DIR_TMP) && grep "^found.*at /lib.*/libpth" foo