diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2014-07-01 21:35:40 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-07-02 20:08:52 -0500 |
commit | 1ef46438da505e9fa13ad7331d11262a9f726de5 (patch) | |
tree | e96fecd4e5a0ccea081cb396db7bea93ddb5cfef /src/build/linker/makefile | |
parent | 84fb8a3cb847fddf52b78058d34afd82fc14e935 (diff) | |
download | talos-hostboot-1ef46438da505e9fa13ad7331d11262a9f726de5.tar.gz talos-hostboot-1ef46438da505e9fa13ad7331d11262a9f726de5.zip |
Build changes to support buildroot
Change-Id: I8f2bef01886d69d275824054faac4be34b9cac6b
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11943
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build/linker/makefile')
-rw-r--r-- | src/build/linker/makefile | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/build/linker/makefile b/src/build/linker/makefile index ab8b26e9f..b9d4c749a 100644 --- a/src/build/linker/makefile +++ b/src/build/linker/makefile @@ -5,7 +5,9 @@ # # OpenPOWER HostBoot Project # -# COPYRIGHT International Business Machines Corp. 2011,2014 +# Contributors Listed Below - COPYRIGHT 2011,2014 +# [+] International Business Machines Corp. +# # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,6 +24,14 @@ # IBM_PROLOG_END_TAG ROOTPATH = ../../.. +ifdef HOST_BINUTILS_DIR +BFD_CFLAGS = -I$(HOST_BINUTILS_DIR)/bfd/ -I$(HOST_BINUTILS_DIR)/include/ +BFD_LDFLAGS = $(HOST_BINUTILS_DIR)/bfd/libbfd.a \ + $(HOST_BINUTILS_DIR)/libiberty/libiberty.a -lz +else +BFD_LDFLAGS = -lbfd -liberty -lz +endif + CODE_PASS_POST += linker gensyms genlist CLEAN_TARGETS += linker linker.o gensyms gensyms.o genlist genlist.o @@ -29,9 +39,10 @@ include $(ROOTPATH)/config.mk linker: linker.C $(C2) " CXX $(notdir $<)" - $(C1)$(CCACHE) $(HOST_PREFIX)g++ -O3 -g linker.C -o linker.o -c + $(C1)$(CCACHE) $(HOST_PREFIX)g++ -O3 -g linker.C -o linker.o -c \ + $(BFD_CFLAGS) $(C1)$(CCACHE) $(HOST_PREFIX)g++ -O3 -g linker.o -o linker \ - -lbfd -liberty -lz + $(BFD_LDFLAGS) $(C1)rm linker.o gensyms: gensyms.C |