NetBSD-Bugs archive

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

Re: port-hppa/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"



The following reply was made to PR port-hppa/56876; it has been noted by GNATS.

From: Nick Hudson <nick.hudson%gmx.co.uk@localhost>
To: gnats-bugs%netbsd.org@localhost, port-hppa-maintainer%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost, tgl%sss.pgh.pa.us@localhost,
 matthew green <mrg%eterna.com.au@localhost>
Cc: 
Subject: Re: port-hppa/56876: hppa: "cc -pg" fails with "undefined reference
 to `mprotect'"
Date: Sat, 11 Jun 2022 07:38:39 +0100

 On 11/06/2022 00:00, Tom Lane wrote:
 > The following reply was made to PR port-hppa/56876; it has been noted by=
  GNATS.
 >
 > From: Tom Lane <tgl%sss.pgh.pa.us@localhost>
 > To: gnats-bugs%netbsd.org@localhost, matthew green <mrg%eterna.com.au@localhost>
 > Cc: port-hppa-maintainer%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
 > Subject: Re: port-hppa/56876: hppa: "cc -pg" fails with "undefined refer=
 ence to `mprotect'"
 > Date: Fri, 10 Jun 2022 18:59:41 -0400
 >
 >   matthew green <mrg%eterna.com.au@localhost> writes:
 >   >  in general, "-pg" requires "-static".  what happens there?
 >
 >   Hmm ... that works:
 >
 >   $ cc -pg -static hello.c
 >   $ ./a.out
 >   hello world
 >   [ plausible-looking gmon.out produced, too ]
 >
 >   Shall I send in a patch to add -static to all these tests that
 >   are invoking -pg without it?  Or is it supposed to work without
 >   that these days?  I don't see any such statement in modern gcc's
 >   manual.
 
 I did this a little while ago
 
 http://www.netbsd.org/~skrll/pg-static.diff
 
 I think this is safer than trying to fix gcc specs with the netbsd-10
 branch so close.  We can also work on fixing the gcc specs.
 
 Nick
 


Home | Main Index | Thread Index | Old Index