Subject: bin/15068: cc(1)'s -pedantic option is also interpreted as -p?
To: None <gnats-bugs@gnats.netbsd.org>
From: Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
List: netbsd-bugs
Date: 12/28/2001 08:30:31
>Number:         15068
>Category:       bin
>Synopsis:       cc(1)'s -pedantic option is also interpreted as -p?
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 27 15:31:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Takahiro Kambe
>Release:        NetBSD 1.5ZA
>Organization:
	
>Environment:
System: NetBSD edge.sky.yamashina.kyoto.jp 1.5ZA NetBSD 1.5ZA (FIVA20X) #97: Mon Dec 24 02:00:30 JST 2001 taca@edge.sky.yamashina.kyoto.jp:/usr/src/sys/arch/i386/compile/FIVA20X i386
Architecture: i386
Machine: i386
>Description:
	With recent toolchain(?), cc(1)'s -pedantic option is also
	interpreted as -p option.  If profiled library isn't installed
	(MKPROFILE=no in /etc/mk.conf), some configure script would fail.
>How-To-Repeat:
	% cat x.c
	main() {}
	% cc -v -pedantic x.c
	Using builtin specs.
	gcc version 2.95.3 20010315 (release) (NetBSD nb1)
	 /usr/libexec/cpp0 -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -D__NetBSD__ -D__ELF__ -D__NetBSD__ -D__ELF__ -Asystem(unix) -Asystem(NetBSD) -Acpu(i386) -Amachine(i386) -pedantic -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ x.c /var/tmp/ccvZ5CIG.i
	GNU CPP version 2.95.3 20010315 (release) (NetBSD nb1) (80386, BSD syntax)
	#include "..." search starts here:
	#include <...> search starts here:
	 /usr/include
	End of search list.
	The following default directories have been omitted from the search path:
	 /usr/include/g++
	End of omitted list.
	 /usr/libexec/cc1 /var/tmp/ccvZ5CIG.i -quiet -dumpbase x.c -pedantic -version -o /var/tmp/cccqLmfe.s
	GNU C version 2.95.3 20010315 (release) (NetBSD nb1) (i386-netbsd) compiled by GNU C version 2.95.3 20010315 (release).
	 as -o /var/tmp/ccJVfEBN.o /var/tmp/cccqLmfe.s
	 /usr/libexec/collect2 -m elf_i386 -dc -dp -e __start -dynamic-linker /usr/libexec/ld.elf_so /usr/lib/crt0.o /usr/lib/crtbegin.o /var/tmp/ccJVfEBN.o -lgcc_p -lc -lgcc_p /usr/lib/crtend.o

	Now, ld.elf_so executed "-lgcc_p", it needs profiled library,
	libgcc_p.a.
>Fix:
	Installing profiled library fixes the problem, but something should
	be fixed in toolchain.
>Release-Note:
>Audit-Trail:
>Unformatted: