[oi-dev] How does one stop meson from generating -pie?

Tim Mooney Tim.Mooney at ndsu.edu
Wed Dec 18 20:47:00 UTC 2019


In regard to: [oi-dev] How does one stop meson from generating -pie?,...:

> Hi.
> Has someone dealt with meson?
> Our meson generates
>
> LINK_ARGS = -pie -m32 -O3 -Wno-error=format-nonliteral -m32 -lsocket -lsecdb -lnsl glib/libglib-2.0.so.0.6200.3 -lm -pthread '-Wl,-rpath,$$ORIGIN/../glib'...
>
> It seems it has strange logic: build every executable with '-pie' and
> static libraries with '-fpic'...

Search for MESON_BUILDPIE in Oracle's meson patch:

 	https://github.com/oracle/solaris-userland/commit/d9d8dfb5ee3b4d5bd14a76f55d87c378791c9d7d

to see how Alan makes PIE configurable.  You basically pass

 	-Db_pie=false

to turn it off.

Tim
-- 
Tim Mooney                                             Tim.Mooney at ndsu.edu
Enterprise Computing & Infrastructure /
Division of Information Technology    /                701-231-1076 (Voice)
North Dakota State University, Fargo, ND 58105-5164




More information about the oi-dev mailing list