[PATCH 1/1] Remove the mandatory -fPIC from CXXFLAGS

Tomaz Canabrava tcanabrava at kde.org
Mon Apr 15 05:13:48 PDT 2013


tomaz:subsurface/ (Qtâ) $
make                                                    [9:02:30]
    CXX qt-gui.cpp
In file included from /usr/include/qt5/QtGui/qwindowdefs.h:45:0,
                 from /usr/include/qt5/QtWidgets/qwidget.h:45,
                 from /usr/include/qt5/QtWidgets/qmainwindow.h:45,
                 from /usr/include/qt5/QtWidgets/QMainWindow:1,
                 from qt-ui/mainwindow.h:10,
                 from qt-gui.cpp:27:
/usr/include/qt5/QtCore/qglobal.h:1079:4: error: #error "You must build
your code with position independent code if Qt was built with
-reduce-relocations. " "Compile your code with -fPIC or -fPIE."
 #  error "You must build your code with position independent code if Qt
was built with -reduce-relocations. "\
    ^
make: *** [qt-gui.o] Error 1


Maybe the -fPIE detection is not working.
I`m adding -fPIE mandatorily here in my build to get back hacking.


2013/4/13 Thiago Macieira <thiago at macieira.org>

> This isn't necessary. There's code below adding -fPIE when necessary
> only.
>
> Signed-off-by: Thiago Macieira <thiago at macieira.org>
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 81e3648..8bbd26f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -3,7 +3,7 @@ VERSION=3.0.2
>  CC=gcc
>  CFLAGS=-Wall -Wno-pointer-sign -g $(CLCFLAGS) -DGSEAL_ENABLE
>  CXX=g++
> -CXXFLAGS=-Wall -g $(CLCFLAGS) -fPIC -DQT_NO_KEYWORDS
> +CXXFLAGS=-Wall -g $(CLCFLAGS) -DQT_NO_KEYWORDS
>  INSTALL=install
>  PKGCONFIG=pkg-config
>  XML2CONFIG=xml2-config
> --
> 1.7.11.7
>
> _______________________________________________
> subsurface mailing list
> subsurface at hohndel.org
> http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130415/570631a0/attachment-0001.html>


More information about the subsurface mailing list