The use of environ causes linking failure when -Wl,--no-undefined is used on FreeBSD
150 views
Skip to first unread message
藍挺瑋
unread,
Jul 8, 2015, 12:39:45 PM7/8/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to googletes...@googlegroups.com
This problem is found by compiling WebKit on FreeBSD because WebKit uses -Wl,--no-undefined by default. The environ symbol exists in crt1.o, but it does not exist in libc.so.7 on FreeBSD, which causes undefined reference error if -Wl,--no-undefined is used.
Can we just use execv() instead of execve() in src/gtest-death-test.cc, so we don't need environ? The comment says we should avoid unsafe functions, so we can only use direct system calls. I think execv() should be safe, as it is just a simple wrapper that calls execve().
藍挺瑋
unread,
Jul 10, 2015, 10:28:06 AM7/10/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to googletes...@googlegroups.com
A simple patch is attached. I don't know whether this is acceptable ...
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to googletes...@googlegroups.com, 藍挺瑋
My patch is already committed to WebKit, but I still get no response on this
official mailing list ...
Ed Maste
unread,
Jan 5, 2017, 11:27:37 AM1/5/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 藍挺瑋, googletes...@googlegroups.com
On 23 April 2016 at 10:49, 藍挺瑋 <lan...@gmail.com> wrote:
> My patch is already committed to WebKit, but I still get no response on this
> official mailing list ...
We had the same issue in LLVM -- FreeBSD support was added to LLVM's
copy[1] in early 2014, and I submitted[2] the changes to googletest in
June 2014. The change was finally applied upstream in January 2015.