diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2013-04-05 14:52:54 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-04-18 09:14:35 -0500 |
commit | e51746288cafd570886dd30625f6a74d15ae3835 (patch) | |
tree | 7fd8af0c1f24e06b8e8099b104b8546fc29c4631 | |
parent | d463911fd7122d75306f6ea9c042d96e1c3597c6 (diff) | |
download | blackbird-hostboot-e51746288cafd570886dd30625f6a74d15ae3835.tar.gz blackbird-hostboot-e51746288cafd570886dd30625f6a74d15ae3835.zip |
Support for new and custom fakeroots.
Change-Id: I94de98109b28434050030af824dd6ca50f7a18dc
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4042
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rwxr-xr-x | env.bash | 44 | ||||
-rw-r--r-- | src/build/linker/makefile | 17 | ||||
-rw-r--r-- | src/build/mkrules/beam.env.mk | 2 | ||||
-rw-r--r-- | src/build/mkrules/cc.env.mk | 15 | ||||
-rwxr-xr-x | src/build/tools/addimgid | 31 | ||||
-rwxr-xr-x | src/build/tools/genlist | 31 | ||||
-rwxr-xr-x | src/build/tools/gensyms | 31 | ||||
-rwxr-xr-x | src/build/tools/listdeps.pl | 11 | ||||
-rwxr-xr-x | src/usr/diag/prdf/framework/rule/makefile | 10 | ||||
-rw-r--r-- | src/usr/errl/parser/makefile | 2 |
10 files changed, 96 insertions, 98 deletions
@@ -1,34 +1,36 @@ -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. # -# $Source: env.bash $ +# $Source: env.bash $ # -# IBM CONFIDENTIAL +# IBM CONFIDENTIAL # -# COPYRIGHT International Business Machines Corp. 2010-2012 +# COPYRIGHT International Business Machines Corp. 2010,2013 # -# p1 +# p1 # -# Object Code Only (OCO) source materials -# Licensed Internal Code Source Materials -# IBM HostBoot Licensed Internal Code +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code # -# The source code for this program is not published or other- -# wise divested of its trade secrets, irrespective of what has -# been deposited with the U.S. Copyright Office. +# The source code for this program is not published or otherwise +# divested of its trade secrets, irrespective of what has been +# deposited with the U.S. Copyright Office. # -# Origin: 30 +# Origin: 30 # -# IBM_PROLOG_END_TAG +# IBM_PROLOG_END_TAG ROOTDIR=. -export MCP_PATH=/opt/mcp/shared/powerhal - -if [ -e /esw/fakeroot/ ]; then - export MCP_PATH=/esw/fakeroot +if [ -e ./customrc ]; then + source ./customrc fi -export PATH=${PATH}:${MCP_PATH}/opt/mcp/bin:${MCP_PATH}/usr/bin +export FAKEROOT=${FAKEROOT:-/opt/mcp/shared/powerpc64-gcc-20130412} +export CROSS_PREFIX=${CROSS_PREFIX:-powerpc64-unknown-linux-gnu-} +export HOST_PREFIX=${HOST_PREFIX:-x86_64-pc-linux-gnu-} + +export PATH=${FAKEROOT}/wrappers:${PATH} export PATH=${PATH}:`pwd`/src/build/lids export PATH=${PATH}:`pwd`/src/build/trace @@ -37,10 +39,6 @@ export PATH=${PATH}:`pwd`/src/build/tools export HOSTBOOTROOT=`pwd` TOOLSDIR=$HOSTBOOTROOT/src/build/tools -if [ -e ./customrc ]; then - source ./customrc -fi - if [ -n "${SANDBOXROOT}" ]; then if [ -n "${SANDBOXNAME}" ]; then export SANDBOXBASE="${SANDBOXROOT}/${SANDBOXNAME}" diff --git a/src/build/linker/makefile b/src/build/linker/makefile index 0eb5c03ce..74635ad00 100644 --- a/src/build/linker/makefile +++ b/src/build/linker/makefile @@ -20,18 +20,13 @@ # Origin: 30 # # IBM_PROLOG_END_TAG -linker: linker.C - i686-mcp6-g++ -O3 -g linker.C -o linker -lbfd -liberty -lz - -all: CODE_PASS +ROOTPATH = ../../.. -CODE_PASS: linker +CODE_PASS_BODY += linker +CLEAN_TARGETS += linker -GEN_PASS: +include $(ROOTPATH)/config.mk -clean: - (rm -f linker) +linker: linker.C + $(HOST_PREFIX)g++ -O3 -g linker.C -o linker -lbfd -liberty -lz -BEAM_PASS: -IMAGE_PASS: -CLEAN_PASS: clean diff --git a/src/build/mkrules/beam.env.mk b/src/build/mkrules/beam.env.mk index cabe35ec1..4c068aceb 100644 --- a/src/build/mkrules/beam.env.mk +++ b/src/build/mkrules/beam.env.mk @@ -27,7 +27,7 @@ BEAMVER = beam-3.5.2 BEAMPATH = /afs/rch/projects/esw/beam/$(BEAMVER) -BEAMCMD = i686-mcp6-jail $(BEAMPATH)/bin/beam_compile +BEAMCMD = $(HOST_PREFIX)jail $(BEAMPATH)/bin/beam_compile BEAMFLAGS = \ --beam::source=$(BEAMPATH)/tcl/beam_default_parms.tcl \ --beam::source=$(ROOTPATH)/src/build/beam/compiler_c_config.tcl \ diff --git a/src/build/mkrules/cc.env.mk b/src/build/mkrules/cc.env.mk index 930a989d8..8a8024c43 100644 --- a/src/build/mkrules/cc.env.mk +++ b/src/build/mkrules/cc.env.mk @@ -25,17 +25,18 @@ # Description: # Configuration of the compiler settings. -MCP_VER = mcp6 +CROSS_PREFIX ?= powerpc64-unknown-linux-gnu- +HOST_PREFIX ?= x86_64-pc-linux-gnu- -CC_RAW = ppc64-$(MCP_VER)-gcc -std=c99 -CXX_RAW = ppc64-$(MCP_VER)-g++ +CC_RAW = $(CROSS_PREFIX)gcc -std=c99 +CXX_RAW = $(CROSS_PREFIX)g++ CC = $(TRACEPP) $(CC_RAW) CXX = $(TRACEPP) $(CXX_RAW) -LD = ppc64-$(MCP_VER)-ld -OBJDUMP = ppc64-$(MCP_VER)-objdump -GCOV = ppc64-$(MCP_VER)-gcov +LD = $(CROSS_PREFIX)ld +OBJDUMP = $(CROSS_PREFIX)objdump +GCOV = $(CROSS_PREFIX)gcov CUSTOM_LINKER_EXE = $(ROOTPATH)/src/build/linker/linker -CUSTOM_LINKER = i686-$(MCP_VER)-jail $(CUSTOM_LINKER_EXE) +CUSTOM_LINKER = $(HOST_PREFIX)jail $(CUSTOM_LINKER_EXE) diff --git a/src/build/tools/addimgid b/src/build/tools/addimgid index bd1493b3f..9417ae12f 100755 --- a/src/build/tools/addimgid +++ b/src/build/tools/addimgid @@ -1,26 +1,26 @@ #!/usr/bin/perl -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. # -# $Source: src/build/tools/addimgid $ +# $Source: src/build/tools/addimgid $ # -# IBM CONFIDENTIAL +# IBM CONFIDENTIAL # -# COPYRIGHT International Business Machines Corp. 2011 +# COPYRIGHT International Business Machines Corp. 2011,2013 # -# p1 +# p1 # -# Object Code Only (OCO) source materials -# Licensed Internal Code Source Materials -# IBM HostBoot Licensed Internal Code +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code # -# The source code for this program is not published or other- -# wise divested of its trade secrets, irrespective of what has -# been deposited with the U.S. Copyright Office. +# The source code for this program is not published or otherwise +# divested of its trade secrets, irrespective of what has been +# deposited with the U.S. Copyright Office. # -# Origin: 30 +# Origin: 30 # -# IBM_PROLOG_END +# IBM_PROLOG_END_TAG use strict; @@ -32,7 +32,8 @@ my $src = shift; my $imgBase = $img; $imgBase =~ s/.*\///; -my $address = hex `ppc64-mcp6-nm $src -C | grep $imageIdSym | colrm 17`; +my $PREFIX = $ENV{'CROSS_PREFIX'}; +my $address = hex `${PREFIX}nm $src -C | grep $imageIdSym | colrm 17`; my $imageId = `git describe --dirty || echo Unknown-Image \`git rev-parse --short HEAD\``; chomp $imageId; diff --git a/src/build/tools/genlist b/src/build/tools/genlist index a3386e55c..a853d096a 100755 --- a/src/build/tools/genlist +++ b/src/build/tools/genlist @@ -1,26 +1,26 @@ #!/usr/bin/perl -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. # -# $Source: src/build/tools/genlist $ +# $Source: src/build/tools/genlist $ # -# IBM CONFIDENTIAL +# IBM CONFIDENTIAL # -# COPYRIGHT International Business Machines Corp. 2011 - 2012 +# COPYRIGHT International Business Machines Corp. 2011,2013 # -# p1 +# p1 # -# Object Code Only (OCO) source materials -# Licensed Internal Code Source Materials -# IBM HostBoot Licensed Internal Code +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code # -# The source code for this program is not published or other- -# wise divested of its trade secrets, irrespective of what has -# been deposited with the U.S. Copyright Office. +# The source code for this program is not published or otherwise +# divested of its trade secrets, irrespective of what has been +# deposited with the U.S. Copyright Office. # -# Origin: 30 +# Origin: 30 # -# IBM_PROLOG_END +# IBM_PROLOG_END_TAG use strict; @@ -180,7 +180,8 @@ foreach my $module (@modules) print "BEGIN MODULE ---- ".$module." ----\n"; my $enabled = 0; my $sections = 0; - open OBJDUMP, ("ppc64-mcp6-objdump -DCS ".add_image_subdir($module)."|"); + my $PREFIX = $ENV{'CROSS_PREFIX'}; + open OBJDUMP, ("${PREFIX}objdump -DCS ".add_image_subdir($module)."|"); while (my $line = <OBJDUMP>) { if (!$enabled && ($sections >= 2)) diff --git a/src/build/tools/gensyms b/src/build/tools/gensyms index 69cdde622..993720045 100755 --- a/src/build/tools/gensyms +++ b/src/build/tools/gensyms @@ -1,26 +1,26 @@ #!/usr/bin/perl -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. # -# $Source: src/build/tools/gensyms $ +# $Source: src/build/tools/gensyms $ # -# IBM CONFIDENTIAL +# IBM CONFIDENTIAL # -# COPYRIGHT International Business Machines Corp. 2011 +# COPYRIGHT International Business Machines Corp. 2011,2013 # -# p1 +# p1 # -# Object Code Only (OCO) source materials -# Licensed Internal Code Source Materials -# IBM HostBoot Licensed Internal Code +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code # -# The source code for this program is not published or other- -# wise divested of its trade secrets, irrespective of what has -# been deposited with the U.S. Copyright Office. +# The source code for this program is not published or otherwise +# divested of its trade secrets, irrespective of what has been +# deposited with the U.S. Copyright Office. # -# Origin: 30 +# Origin: 30 # -# IBM_PROLOG_END +# IBM_PROLOG_END_TAG use strict; @@ -93,7 +93,8 @@ foreach my $module (@modules) next; } - open OBJDUMP, ("ppc64-mcp6-objdump --syms -C ".add_image_subdir($module)."|"); + my $PREFIX = $ENV{'CROSS_PREFIX'}; + open OBJDUMP, ("${PREFIX}objdump --syms -C ".add_image_subdir($module)."|"); while (my $line = <OBJDUMP>) { if (($line =~ m/\*ABS\*/) || ($line =~ m/\*UND\*/)) diff --git a/src/build/tools/listdeps.pl b/src/build/tools/listdeps.pl index b9c2f3675..1f89e8648 100755 --- a/src/build/tools/listdeps.pl +++ b/src/build/tools/listdeps.pl @@ -121,7 +121,8 @@ my @module_names = < *.so >; # shared library where it is defined. foreach $module_name (@module_names ) { - my @output = `ppc64-mcp6-nm -AD --defined-only $module_name`; + my $PREFIX = $ENV{'CROSS_PREFIX'}; + my @output = `${PREFIX}nm -AD --defined-only $module_name`; chomp @output; @@ -141,7 +142,7 @@ foreach $module_name (@module_names ) # if there was a library name passed in use that # otherwise if they asked to list all dependencies -# then use the list we already created above, +# then use the list we already created above, # default is to the list required libs of istep modules my @istep_modules = (); @@ -349,11 +350,11 @@ sub validate foreach my $match ( @Dependencies ) { # check if the there exists a match - if ( !(defined $ListedDeps{$match}) && ($match) && + if ( !(defined $ListedDeps{$match}) && ($match) && !(defined $resident_modules{ $match } ) ) { print "$module is MISSING DEPENDENCY $match\n"; - print "\nplease add \"DEP_LIB($match),\""; + print "\nplease add \"DEP_LIB($match),\""; print " to src/include/usr/isteps/$istepFile\n\n"; $rc = -1; } @@ -382,7 +383,7 @@ sub usage print "-p will print dependency requirements\n"; print "-All will print all dependency requirements (not just istep modules)\n"; print "requires the -p option.\n\n"; - + exit 0; } diff --git a/src/usr/diag/prdf/framework/rule/makefile b/src/usr/diag/prdf/framework/rule/makefile index b55be8218..cc3151c43 100755 --- a/src/usr/diag/prdf/framework/rule/makefile +++ b/src/usr/diag/prdf/framework/rule/makefile @@ -98,20 +98,20 @@ ${PRDR_CMP_FLEX_C_PATH}: ${PRDR_CMP_FLEX} USERDEFINES = -D__HOSTBOOT_MODULE -O3 -pipe ${PRDR_CMP_YACC_o_PATH}: ${PRDR_CMP_YACC_C_PATH} ${PRDR_CMP_YACC_H_PATH} - i686-$(MCP_VER)-g++ -c $(USERDEFINES) $< \ + $(HOST_PREFIX)g++ -c $(USERDEFINES) $< \ -I ${PRD_USR_PATH}/common/framework/rule \ -I ${PRD_USR_PATH}/common/util -I ${RULEOBJDIR} \ -o $@ ${PRDR_CMP_FLEX_o_PATH}: ${PRDR_CMP_FLEX_C_PATH} ${PRDR_CMP_YACC_H_PATH} - i686-$(MCP_VER)-g++ -c $(USERDEFINES) $< \ + $(HOST_PREFIX)g++ -c $(USERDEFINES) $< \ -I ${PRD_USR_PATH}/common/framework/rule \ -I ${PRD_USR_PATH}/common/util -I ${RULEOBJDIR} \ -o $@ ${PRDR_CMP_o_PATH}: ${PRDR_CMP_C} mkdir -p ${RULEOBJDIR} - i686-$(MCP_VER)-g++ -c $(USERDEFINES) $< \ + $(HOST_PREFIX)g++ -c $(USERDEFINES) $< \ -I ${PRD_USR_PATH}/common/framework/rule \ -I ${PRD_USR_PATH}/common \ -I ${PRD_USR_PATH}/common/util \ @@ -122,7 +122,7 @@ ${PRDR_CMP_o_PATH}: ${PRDR_CMP_C} ${PRDR_CMP_PATH}: ${PRDR_CMP_YACC_o_PATH} ${PRDR_CMP_FLEX_o_PATH} \ ${PRDR_CMP_o_PATH} - i686-$(MCP_VER)-g++ $(USERDEFINES) \ + $(HOST_PREFIX)g++ $(USERDEFINES) \ ${PRDR_CMP_YACC_o_PATH} ${PRDR_CMP_FLEX_o_PATH} ${PRDR_CMP_o_PATH} \ -o $@ @@ -136,7 +136,7 @@ PRDRPP_SEARCHDIRS = -I../../common/plat/pegasus # Build .prf files from .rule files and store them in ${RULEOBJDIR} ${RULEOBJDIR}/%.prf : %.rule ${PRDR_CMP_PATH} cat $< | ${PRD_USR_PATH}/common/framework/rule/prdrpp ${PRDRPP_SEARCHDIRS} \ - | i686-$(MCP_VER)-jail ${PRDR_CMP_PATH} $@ + | $(HOST_PREFIX)jail ${PRDR_CMP_PATH} $@ # Copy all .prf files from ${RULEOBJDIR} to ${IMGDIR} ${EXTRA_PARTS}: ${IMGDIR}/% : ${RULEOBJDIR}/% diff --git a/src/usr/errl/parser/makefile b/src/usr/errl/parser/makefile index 3cf63bba6..fe6ba5686 100644 --- a/src/usr/errl/parser/makefile +++ b/src/usr/errl/parser/makefile @@ -43,7 +43,7 @@ ERRLPARSE_TARGETS = \ ${GENDIR}/plugins/hbfwUdIds.H \ ${GENDIR}/plugins/makefile -CC=i686-mcp6-g++ -m32 +CC=$(HOST_PREFIX)g++ -m32 -static CFLAGS:=-g -O0 -I $(ROOTPATH)/src/include/usr -I ${GENDIR} all: GEN_PASS CODE_PASS |