From 1ef46438da505e9fa13ad7331d11262a9f726de5 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Tue, 1 Jul 2014 21:35:40 -0500 Subject: 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 --- src/build/trace/makefile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/build/trace/makefile') diff --git a/src/build/trace/makefile b/src/build/trace/makefile index b30529c10..e80ed8a68 100644 --- a/src/build/trace/makefile +++ b/src/build/trace/makefile @@ -5,7 +5,9 @@ # # OpenPOWER HostBoot Project # -# COPYRIGHT International Business Machines Corp. 2013,2014 +# Contributors Listed Below - COPYRIGHT 2013,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. @@ -25,10 +27,19 @@ ROOTPATH = ../../.. GEN_PASS_BODY += tracehash CLEAN_TARGETS += tracehash tracehash.o +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 +endif + include $(ROOTPATH)/config.mk tracehash: tracehash.c $(C2) " CC $(notdir $<)" - $(C1)$(CCACHE) $(HOST_PREFIX)gcc -std=c99 -O3 -g -c $< -o $@.o - $(C1)$(CCACHE) $(HOST_PREFIX)gcc -O3 -g $@.o -o $@ -lbfd + $(C1)$(CCACHE) $(HOST_PREFIX)gcc -std=c99 -O3 -g -c $< -o $@.o \ + $(BFD_CFLAGS) + $(C1)$(CCACHE) $(HOST_PREFIX)gcc -O3 -g $@.o -o $@ $(BFD_LDFLAGS) $(C1)rm $@.o -- cgit v1.2.1