From fb6b4c0ceb1cc63b3aafaf846f166af61e4af5fb Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 12 Apr 2010 17:37:42 +0000 Subject: [PATCH] Add $[AR] to make Linux cross-compilation a little bit easier --- dtool/Config.FreeBSD.pp | 6 ++++-- dtool/Config.Linux.pp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dtool/Config.FreeBSD.pp b/dtool/Config.FreeBSD.pp index 9a96e106ca..ebe8edb1dd 100644 --- a/dtool/Config.FreeBSD.pp +++ b/dtool/Config.FreeBSD.pp @@ -27,6 +27,7 @@ #if $[eq $[USE_COMPILER], GCC] #define CC gcc #define CXX g++ + #define AR ar // gcc might run into template limits on some parts of Panda. // I upped this from 25 to build on OS X (GCC 3.3) -- skyler. @@ -34,6 +35,7 @@ #else #define CC cc #define CXX CC + #define AR ar #endif // FreeBSD doesn't (yet) have any funny architecture flags. @@ -102,8 +104,8 @@ // How to generate a static C or C++ library. $[target] is the // name of the library to generate, and $[sources] is the list of .o // files that will go into the library. -#defer STATIC_LIB_C ar cru $[target] $[sources] -#defer STATIC_LIB_C++ ar cru $[target] $[sources] +#defer STATIC_LIB_C $[AR] cru $[target] $[sources] +#defer STATIC_LIB_C++ $[AR] cru $[target] $[sources] // How to run ranlib, if necessary, after generating a static library. // $[target] is the name of the library. Set this to the empty string diff --git a/dtool/Config.Linux.pp b/dtool/Config.Linux.pp index 7d42e0a92f..e571ce15d3 100644 --- a/dtool/Config.Linux.pp +++ b/dtool/Config.Linux.pp @@ -27,6 +27,7 @@ #if $[eq $[USE_COMPILER], GCC] #define CC gcc #define CXX g++ + #define AR ar // gcc might run into template limits on some parts of Panda. // I upped this from 25 to build on OS X (GCC 3.3) -- skyler. @@ -34,6 +35,7 @@ #else #define CC cc #define CXX CC + #define AR ar #endif // Linux doesn't (yet) have any funny architecture flags. @@ -102,8 +104,8 @@ // How to generate a static C or C++ library. $[target] is the // name of the library to generate, and $[sources] is the list of .o // files that will go into the library. -#defer STATIC_LIB_C ar cru $[target] $[sources] -#defer STATIC_LIB_C++ ar cru $[target] $[sources] +#defer STATIC_LIB_C $[AR] cru $[target] $[sources] +#defer STATIC_LIB_C++ $[AR] cru $[target] $[sources] // How to run ranlib, if necessary, after generating a static library. // $[target] is the name of the library. Set this to the empty string