version 1.358, 2015/06/04 06:01:24 |
version 1.369, 2017/04/20 09:29:11 |
Line 42 realinstall: checkver libinstall |
|
Line 42 realinstall: checkver libinstall |
|
# XXX: This is needed for programs that link with .a libraries |
# XXX: This is needed for programs that link with .a libraries |
# Perhaps a more correct solution is to always generate _pic.a |
# Perhaps a more correct solution is to always generate _pic.a |
# files or always have a shared library. |
# files or always have a shared library. |
.if defined(MKPIE) && (${MKPIE} != "no") |
# XXX: This breaks profiling (__mcount relocation is wrong) |
|
.if defined(MKPIE) && (${MKPIE} != "no") && !defined(NOPIE) |
CFLAGS+= ${PIE_CFLAGS} |
CFLAGS+= ${PIE_CFLAGS} |
AFLAGS+= ${PIE_AFLAGS} |
AFLAGS+= ${PIE_AFLAGS} |
.endif |
.endif |
Line 156 MKSHLIBOBJS= yes |
|
Line 157 MKSHLIBOBJS= yes |
|
MKSHLIBOBJS= no |
MKSHLIBOBJS= no |
.endif |
.endif |
|
|
.if (defined(MKDEBUG) && (${MKDEBUG} != "no")) || \ |
.if (${MKDEBUG:Uno} != "no" && !defined(NODEBUG)) || \ |
(defined(CFLAGS) && !empty(CFLAGS:M*-g*)) |
(defined(CFLAGS) && !empty(CFLAGS:M*-g*)) |
# We only add -g to the shared library objects |
# We only add -g to the shared library objects |
# because we don't currently split .a archives. |
# because we don't currently split .a archives. |
Line 187 FFLAGS+= ${FOPTS} |
|
Line 188 FFLAGS+= ${FOPTS} |
|
.if defined(CTFCONVERT) |
.if defined(CTFCONVERT) |
.if defined(CFLAGS) && !empty(CFLAGS:M*-g*) |
.if defined(CFLAGS) && !empty(CFLAGS:M*-g*) |
CTFFLAGS+= -g |
CTFFLAGS+= -g |
.if defined(HAVE_GCC) && ${HAVE_GCC} >= 48 |
.if defined(HAVE_GCC) |
#CFLAGS+= -gdwarf-2 |
#CFLAGS+= -gdwarf-2 |
.endif |
.endif |
.endif |
.endif |
Line 407 _LIB.so:=${_LIB}.so |
|
Line 408 _LIB.so:=${_LIB}.so |
|
_LIB.so.major:=${_LIB}.so.${SHLIB_MAJOR} |
_LIB.so.major:=${_LIB}.so.${SHLIB_MAJOR} |
_LIB.so.full:=${_LIB}.so.${SHLIB_FULLVERSION} |
_LIB.so.full:=${_LIB}.so.${SHLIB_FULLVERSION} |
_LIB.so.link:=${_LIB}.so.${SHLIB_FULLVERSION}.link |
_LIB.so.link:=${_LIB}.so.${SHLIB_FULLVERSION}.link |
.if ${MKDEBUG} != "no" |
.if ${MKDEBUG:Uno} != "no" && !defined(NODEBUG) |
_LIB.so.debug:=${_LIB.so.full}.debug |
_LIB.so.debug:=${_LIB.so.full}.debug |
.endif |
.endif |
.endif |
.endif |
Line 524 _YLSRCS= ${SRCS:M*.[ly]:C/\..$/.c/} ${YH |
|
Line 525 _YLSRCS= ${SRCS:M*.[ly]:C/\..$/.c/} ${YH |
|
|
|
realall: ${SRCS} ${ALLOBJS:O} ${_LIBS} ${_LIB.so.debug} |
realall: ${SRCS} ${ALLOBJS:O} ${_LIBS} ${_LIB.so.debug} |
|
|
MKARZERO?= ${MKREPRO:Uno} |
|
|
|
.if ${MKARZERO} == "yes" |
.if ${MKARZERO} == "yes" |
_ARFL=crsD |
_ARFL=crsD |
_ARRANFL=sD |
_ARRANFL=sD |
Line 578 _LIBLDOPTS+= -Wl,-rpath,${SHLIBDIR} \ |
|
Line 577 _LIBLDOPTS+= -Wl,-rpath,${SHLIBDIR} \ |
|
_LIBLDOPTS+= -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR} \ |
_LIBLDOPTS+= -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR} \ |
-L=${SHLIBINSTALLDIR} |
-L=${SHLIBINSTALLDIR} |
.endif |
.endif |
|
.if ${MKSTRIPSYM:Uyes} == "yes" |
|
_LIBLDOPTS+= -Wl,-x |
|
.else |
|
_LIBLDOPTS+= -Wl,-X |
|
.endif |
|
|
# gcc -shared now adds -lc automatically. For libraries other than libc and |
# gcc -shared now adds -lc automatically. For libraries other than libc and |
# libgcc* we add as a dependency the installed shared libc. For libc and |
# libgcc* we add as a dependency the installed shared libc. For libc and |
Line 636 ${_LIB.so.full}: ${_MAINLIBDEPS} |
|
Line 640 ${_LIB.so.full}: ${_MAINLIBDEPS} |
|
.endif |
.endif |
${_MKTARGET_BUILD} |
${_MKTARGET_BUILD} |
rm -f ${.TARGET} |
rm -f ${.TARGET} |
${LIBCC} ${LDLIBC} -Wl,-x -shared ${SHLIB_SHFLAGS} \ |
${LIBCC} ${LDLIBC} -shared ${SHLIB_SHFLAGS} \ |
${_LDFLAGS.${_LIB}} -o ${.TARGET} ${_LIBLDOPTS} \ |
${_LDFLAGS.${_LIB}} -o ${.TARGET} ${_LIBLDOPTS} \ |
-Wl,--whole-archive ${SOLIB} \ |
-Wl,--whole-archive ${SOLIB} \ |
-Wl,--no-whole-archive ${_LDADD.${_LIB}} |
-Wl,--no-whole-archive ${_LDADD.${_LIB}} |