From c19649b36ee77b68f4bb65ed6cb1a905112defe1 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Wed, 19 Mar 2008 01:47:23 +0000 Subject: [PATCH] djb-config: Improved runit/djb-config to s/gcc/$CC/ in conf-cc and conf-ld when cross compiling --- base/runit/djb-config | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/base/runit/djb-config b/base/runit/djb-config index efc443b10..6186529e8 100644 --- a/base/runit/djb-config +++ b/base/runit/djb-config @@ -68,6 +68,16 @@ if [ "$createdocs" != "0" ]; then hook_add postdoc 2 'pkg_djb_installdoc $pkg_djb_hierarchy' fi +if atstage cross; then + # adjust conf-cc and conf-ld files for using the cross-compiler + pkg_djb_crosscc() { + echo_warning "Adjusting config files for cross-compiling" + sed -i "s,gcc,$CC,g" \ + src/conf-cc src/conf-ld + } + hook_add premake 5 "pkg_djb_crosscc" +fi + # custmain # custmain="pkg_djb_main"