summaryrefslogtreecommitdiffstats
path: root/FUNCTIONS
diff options
context:
space:
mode:
authorJeremy Blosser2006-04-24 23:39:08 -0500
committerJeremy Blosser2006-04-24 23:39:08 -0500
commite860eecc92bd2ac10566e624d348139fc924d3dc (patch)
tree3f96b717f2be8b96c8a829d7cc8ade71daf290bb /FUNCTIONS
parentc6437ac4d8f7dff71f957652ae3bdbe85e0688c5 (diff)
sync ./FUNCTIONS from test
Diffstat (limited to 'FUNCTIONS')
-rwxr-xr-xFUNCTIONS19
1 files changed, 19 insertions, 0 deletions
diff --git a/FUNCTIONS b/FUNCTIONS
index dbdff2c13d..f444e408b4 100755
--- a/FUNCTIONS
+++ b/FUNCTIONS
@@ -1,5 +1,6 @@
. $GRIMOIRE/libaccount
. $GRIMOIRE/libgcc
+. $GRIMOIRE/config_query_multi.function
#---------------------------------------------------------------------
## Replaces sorcerys default_build with a custom version using
@@ -399,3 +400,21 @@ function default_build_python() {
function default_install_python() {
python setup.py install ${INSTALL_ROOT:+--root "$INSTALL_ROOT/"}
}
+
+
+#---
+## disable_pic
+## A function to smartly disable -DPIC and -fPIC flags
+## has one optional parameter: force which forces disable
+#---
+
+disable_pic() {
+if [[ "$SMGL_COMPAT_ARCHS[1]" != "x86_64" ]] ||
+ [[ "$1" == "force" ]]
+then
+CFLAGS=${CFLAGS/-fPIC} &&
+CFLAGS=${CFLAGS/-DPIC} &&
+CXXFLAGS=${CXXFLAGS/-fPIC} &&
+CXXFLAGS=${CXXFLAGS/-DPIC}
+fi
+}