[kde-freebsd] [suggestion:qmake4] auto gcc4x RPATH setting by makespec
RyōTa SimaMoto
liangtai.s4 at gmail.com
Mon Jul 2 14:04:28 UTC 2012
Hi,
I suggest Qt4 porters to use QMAKE_LIBS variable of the
makespec system for RPATH setting. For example:
--- mkspecs/freebsd-g++46/qmake.conf.orig
+++ mkspecs/freebsd-g++46/qmake.conf
@@ -24,7 +24,7 @@
QMAKE_LFLAGS_THREAD = -pthread
-QMAKE_LIBS =
+QMAKE_LIBS = -Wl,-rpath,/usr/local/lib/gcc46
QMAKE_LIBS_DYNLOAD =
QMAKE_LIBS_X11 = -lXext -lX11 -lm
QMAKE_LIBS_X11SM = -lSM -lICE
I choosed QMAKE_LIBS variable for this change, but another
variable might be more suitable. This change would be
done on devel/qmake4.
* Reason:
As you know, when you use lang/gcc4x family to compile,
built programs should link to proper libraries
(i.e. /usr/local/lib/gcc4*/libgcc_s.so,
/usr/local/lib/gcc4*/libstdc++so, ...) provided by these
compilers with -rpath setting on Makefile. If this
procedure is automated, users would be happy.
I think this should be done with makespec system of Qt.
To put it concretely, on somewhat port that use
qmake-qt4 command, by setting QMAKESPEC=
/usr/local/qt4/mkspecs/freebsd-g++47 USE_GCC=4.7 with
'make && make install', users can expect producted
binaries would not link against wrong library like as
/usr/lib/libgcc_s.so, but they would load lang/gcc47
related libraries instead.
SimaMoto,RyōTa <liangtai.s4 at gmail.com>
More information about the kde-freebsd
mailing list