pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PKGSRC_MKPIE question



I was looking at how pkgsrc supports PIE - position independent
executables. For example, mk/compiler/gcc-style-args.mk has the
following fragment:

.if ${_PKGSRC_MKPIE} == "yes"
_MKPIE_CFLAGS=          -fPIC
# for libraries a sink wrapper around gcc is required and used instead
_MKPIE_LDFLAGS=         -pie
.endif

However, GCC man page talks about two separate options:

-fPIC used for position independent libraries
-fPIE used for position independent executables

however pkgsrc does not seem to use -fPIE at all.

It would seem -fPIE may be more efficient when used with executables,
although I've not done any benchmarks on it. Is there a reason pkgsrc
is not using -fPIE? Do most packages' makefiles not support the
distinction?


Home | Main Index | Thread Index | Old Index