From da7a7fe56c988894afdcb8b04087cd96278dcfec Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Mon, 9 Aug 2010 22:25:32 +0000 Subject: [PATCH] build: consolidate PIC flags should fix X86_32 build git-svn-id: http://svn.mythtv.org/svn/trunk@25598 7dbf422c-18fa-0310-86e9-fd20926502f2 --- mythtv/libs/libavcodec/libavcodec.pro | 2 +- mythtv/libs/libavutil/libavutil.pro | 2 +- mythtv/libs/libmythbluray/libmythbluray.pro | 3 --- mythtv/libs/libmythdvdnav/libmythdvdnav.pro | 3 --- mythtv/libs/libmythfreesurround/libmythfreesurround.pro | 3 --- mythtv/libs/libmythmpeg2/libmythmpeg2.pro | 2 +- mythtv/libs/libmythnvctrl/libmythnvctrl.pro | 3 --- mythtv/libs/libmythsamplerate/libmythsamplerate.pro | 3 --- mythtv/libs/libmythsoundtouch/libmythsoundtouch.pro | 3 --- mythtv/libs/libpostproc/libpostproc.pro | 3 ++- mythtv/libs/libswscale/libswscale.pro | 2 +- mythtv/settings.pro | 3 --- 12 files changed, 6 insertions(+), 26 deletions(-) diff --git a/mythtv/libs/libavcodec/libavcodec.pro b/mythtv/libs/libavcodec/libavcodec.pro index cd74b2c9294..ddd16659a0c 100644 --- a/mythtv/libs/libavcodec/libavcodec.pro +++ b/mythtv/libs/libavcodec/libavcodec.pro @@ -25,7 +25,7 @@ debug:contains(ARCH_X86_32, yes) { } # gcc-4.2 and newer can not compile with PIC on x86 contains(ARCH_X86_32, yes) { - QMAKE_CFLAGS_SHLIB = + QMAKE_CFLAGS -= -fPIC -DPIC } !profile:QMAKE_CFLAGS_DEBUG += -O diff --git a/mythtv/libs/libavutil/libavutil.pro b/mythtv/libs/libavutil/libavutil.pro index 1ada2639f6f..a1d68fc2c35 100644 --- a/mythtv/libs/libavutil/libavutil.pro +++ b/mythtv/libs/libavutil/libavutil.pro @@ -16,7 +16,7 @@ DEFINES += HAVE_AV_CONFIG_H # Debug mode on x86 must compile without -fPIC # otherwise gcc runs out of registers. debug:contains(ARCH_X86_32, yes) { - QMAKE_CFLAGS_SHLIB = + QMAKE_CFLAGS -= -fPIC -DPIC } QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2) diff --git a/mythtv/libs/libmythbluray/libmythbluray.pro b/mythtv/libs/libmythbluray/libmythbluray.pro index 877034b1a17..72f29b76366 100644 --- a/mythtv/libs/libmythbluray/libmythbluray.pro +++ b/mythtv/libs/libmythbluray/libmythbluray.pro @@ -10,9 +10,6 @@ INCLUDEPATH += . ../../ INCLUDEPATH += ./bdnav INCLUDEPATH += ../libmythdb -#build position independent code since the library is linked into a shared library -QMAKE_CFLAGS += -fPIC -DPIC - DEFINES += HAVE_CONFIG_H DLOPEN_CRYPTO_LIBS # DEFINES += LOG_DEBUG TRACE diff --git a/mythtv/libs/libmythdvdnav/libmythdvdnav.pro b/mythtv/libs/libmythdvdnav/libmythdvdnav.pro index 4cd2b170cc5..fb91f1a3f37 100644 --- a/mythtv/libs/libmythdvdnav/libmythdvdnav.pro +++ b/mythtv/libs/libmythdvdnav/libmythdvdnav.pro @@ -10,9 +10,6 @@ INCLUDEPATH += . ../../ INCLUDEPATH += ./dvdnav INCLUDEPATH += ../libmythdb -#build position independent code since the library is linked into a shared library -QMAKE_CFLAGS += -fPIC -DPIC - # for -ldl LIBS += $$EXTRA_LIBS diff --git a/mythtv/libs/libmythfreesurround/libmythfreesurround.pro b/mythtv/libs/libmythfreesurround/libmythfreesurround.pro index cb6c1656423..6bc31ae31c6 100644 --- a/mythtv/libs/libmythfreesurround/libmythfreesurround.pro +++ b/mythtv/libs/libmythfreesurround/libmythfreesurround.pro @@ -6,9 +6,6 @@ CONFIG += thread staticlib warn_off INCLUDEPATH += ../libavcodec ../libmythdb .. ../.. -#build position independent code since the library is linked into a shared library -QMAKE_CXXFLAGS += -fPIC -DPIC - QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2) # Input diff --git a/mythtv/libs/libmythmpeg2/libmythmpeg2.pro b/mythtv/libs/libmythmpeg2/libmythmpeg2.pro index 8a39bcab862..990b1ebff2c 100644 --- a/mythtv/libs/libmythmpeg2/libmythmpeg2.pro +++ b/mythtv/libs/libmythmpeg2/libmythmpeg2.pro @@ -6,7 +6,7 @@ CONFIG += thread staticlib warn_off CONFIG -= qt #build position independent code since the library is linked into a shared library -QMAKE_CFLAGS += -fPIC -DPIC -fno-common +QMAKE_CFLAGS += -fno-common QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2) diff --git a/mythtv/libs/libmythnvctrl/libmythnvctrl.pro b/mythtv/libs/libmythnvctrl/libmythnvctrl.pro index 0791ce2d210..1a9f3944b47 100644 --- a/mythtv/libs/libmythnvctrl/libmythnvctrl.pro +++ b/mythtv/libs/libmythnvctrl/libmythnvctrl.pro @@ -7,9 +7,6 @@ CONFIG -= qt INCLUDEPATH += ../ ../../ -#build position independent code since the library is linked into a shared library -QMAKE_CFLAGS += -fPIC -DPIC - DEFINES += HAVE_AV_CONFIG_H QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2) diff --git a/mythtv/libs/libmythsamplerate/libmythsamplerate.pro b/mythtv/libs/libmythsamplerate/libmythsamplerate.pro index 325ec7181d0..d92778f1808 100644 --- a/mythtv/libs/libmythsamplerate/libmythsamplerate.pro +++ b/mythtv/libs/libmythsamplerate/libmythsamplerate.pro @@ -7,9 +7,6 @@ CONFIG -= qt INCLUDEPATH += ../ ../../ -#build position independent code since the library is linked into a shared library -QMAKE_CFLAGS += -fPIC -DPIC - DEFINES += HAVE_AV_CONFIG_H QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2) diff --git a/mythtv/libs/libmythsoundtouch/libmythsoundtouch.pro b/mythtv/libs/libmythsoundtouch/libmythsoundtouch.pro index 56ced37a4af..2b88e612b8e 100644 --- a/mythtv/libs/libmythsoundtouch/libmythsoundtouch.pro +++ b/mythtv/libs/libmythsoundtouch/libmythsoundtouch.pro @@ -7,9 +7,6 @@ CONFIG -= qt INCLUDEPATH += ../../libs/libavcodec ../.. -#build position independent code since the library is linked into a shared library -QMAKE_CXXFLAGS += -fPIC -DPIC - # Like libavcodec, debug mode on x86 runs out of registers on some GCCs. !profile:QMAKE_CXXFLAGS_DEBUG += -O diff --git a/mythtv/libs/libpostproc/libpostproc.pro b/mythtv/libs/libpostproc/libpostproc.pro index ba0205302c9..b2a5396fd27 100644 --- a/mythtv/libs/libpostproc/libpostproc.pro +++ b/mythtv/libs/libpostproc/libpostproc.pro @@ -18,7 +18,8 @@ DEFINES += HAVE_AV_CONFIG_H # Debug mode on x86 must compile without -fPIC # otherwise gcc runs out of registers. debug:contains(ARCH_X86_32, yes) { - QMAKE_CFLAGS_SHLIB = -O1 + QMAKE_CFLAGS -= -fPIC -DPIC + QMAKE_CFLAGS += -O1 } QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2) diff --git a/mythtv/libs/libswscale/libswscale.pro b/mythtv/libs/libswscale/libswscale.pro index 4b0a8f52fba..7de83093e56 100644 --- a/mythtv/libs/libswscale/libswscale.pro +++ b/mythtv/libs/libswscale/libswscale.pro @@ -14,7 +14,7 @@ debug:contains(ARCH_X86_32, yes) { } # gcc-4.2 and newer can not compile with PIC on x86 contains(ARCH_X86_32, yes) { - QMAKE_CFLAGS_SHLIB = + QMAKE_CFLAGS -= -fPIC -DPIC } diff --git a/mythtv/settings.pro b/mythtv/settings.pro index 35c5b96d847..c630feb24e7 100644 --- a/mythtv/settings.pro +++ b/mythtv/settings.pro @@ -92,9 +92,6 @@ profile:CONFIG += debug QMAKE_CXXFLAGS += $$CONFIG_DIRECTFB_CXXFLAGS -QMAKE_CFLAGS_SHLIB = -DPIC -fPIC -QMAKE_CXXFLAGS_SHLIB = -DPIC -fPIC - # Allow compilation with Qt Embedded, if Qt is compiled without "-fno-rtti" QMAKE_CXXFLAGS -= -fno-exceptions -fno-rtti