Current-Users archive

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

MKPIE breaks build



good day

i have read mk.conf(8) man page.

i would like to use this feature PIE (Position Independent
Executables). but building the important libc seems to break on a ld
error

collect2: ld returned 1 exit status

*** Failed target:  libc.so.12.163
*** Failed command:
/usr/obj/tooldir.NetBSD-x86_64/bin/x86_64--netbsd-gcc -nodefaultlibs
-Wl,-nostdlib -B/usr/obj/destdir.amd64/usr/lib/
-B/usr/obj/destdir.amd64/usr/lib/
-Wl,-rpath-link,/usr/obj/destdir.amd64/lib
:/usr/obj/destdir.amd64/usr/lib -R/lib -L/usr/obj/destdir.amd64/lib
-Wl,-x -shared -Wl,-soname,libc.so.12 -Wl,--warn-shared-textrel
-Wl,-z,initfirst -Wl,--fatal-warnings -Wl,-pie -shared-libgcc -o
libc.so.12.163 -
Wl,--whole-archive libc_pic.a -Wl,--no-whole-archive -lgcc_pic
-L/usr/obj/destdir.amd64/usr/lib
*** Error code 1

Stop.
nbmake: stopped in /usr/src/lib/libc

*** Failed target:  dependall
*** Failed command: cd /usr/src/lib/libc;
/usr/obj/tooldir.NetBSD-x86_64/bin/nbmake realall
*** Error code 1

Stop.
nbmake: stopped in /usr/src/lib/libc

*** Failed target:  do-lib-libc
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1";
shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .)
this=""; real="/usr/src" ;; *) this="${dir}/"; real="/usr/src/${dir}"
;; esac; s
how=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd
"${real}" && /usr/obj/tooldir.NetBSD-x86_64/bin/nbmake
_THISDIR_="${this}" "$@" ${target}; }; _makedirtarget lib/libc
dependall
*** Error code 1

Stop.
nbmake: stopped in /usr/src

*** Failed target:  build
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1";
shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .)
this=""; real="/usr/src" ;; *) this="${dir}/"; real="/usr/src/${dir}"
;; esac; s
how=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd
"${real}" && /usr/obj/tooldir.NetBSD-x86_64/bin/nbmake
_THISDIR_="${this}" "$@" ${target}; }; _makedirtarget . do-lib-libc
*** Error code 1

Stop.
nbmake: stopped in /usr/src

ERROR: Failed to make build
*** BUILD ABORTED ***

if I don not use PIE [MKPIE = no] i can build no problemo, great!

MS.


Home | Main Index | Thread Index | Old Index