https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216587

Dimitry Andric <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |Not A Bug
             Status|In Progress                 |Closed

--- Comment #3 from Dimitry Andric <[email protected]> ---
Removing some stuff from the command line to clarify:

> c++ -c [...] -pie -fPIE [...] -o chatline.o src/chatlog/chatline.cpp

So this is a compilation of a .cpp file to .o, and this case the -pie option
does not apply, as it is meant for the link phase.

Examples of how to avoid "unused argument" warnings:

$ c++ -fPIE -pie helloworld.cpp -o helloworld

$ file helloworld
helloworld: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD),
dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 12.0
(1200020), FreeBSD-style, not stripped

$ c++ -fPIE -c helloworld.cpp

$ c++ -pie helloworld.o -o helloworld

$ file helloworld
helloworld: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD),
dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 12.0
(1200020), FreeBSD-style, not stripped

Alternatively, if it is difficult to get upstream software to untangle CFLAGS,
CXXFLAGS and LDFLAGS, add -Qunused-arguments.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "[email protected]"

Reply via email to