gnu/85895: [PATCH] cc -print-search-dirs returns (null)

Andreas Kohn andreas at syndrom23.de
Thu Sep 8 22:40:17 PDT 2005


>Number:         85895
>Category:       gnu
>Synopsis:       [PATCH] cc -print-search-dirs returns (null)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 09 05:40:13 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Andreas Kohn
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:


System: FreeBSD 7.0-CURRENT #20: Mon Aug 22 20:25:19 CEST 2005
    root at klamath.syndrom23.de:/usr/obj/usr/src/sys/KLAMATH



>Description:


cc -print-search-dirs should print the installation location of cc, and where support files can be found.
The lcc sources (at least the included one for Q3A) use this flag.




>How-To-Repeat:


Expected behavior:
$ cc -print-search-dirs
install: /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/
(from a linux system)

Behavior on FreeBSD:
$ cc -print-search-dirs
install: /usr/libexec/(null)



>Fix:


This patch fixes the (null). DragonflyBSD uses a similar, but longer change to remove the use of machine_suffix completely.

--- gcc-print-search-dirs-null.diff begins here ---
Index: contrib/gcc/gcc.c
===================================================================
RCS file: /storage/freebsd/cvs/src/contrib/gcc/gcc.c,v
retrieving revision 1.40
diff -u -r1.40 gcc.c
--- contrib/gcc/gcc.c	3 Jun 2005 04:02:20 -0000	1.40
+++ contrib/gcc/gcc.c	20 Aug 2005 13:02:49 -0000
@@ -6095,6 +6095,7 @@
   /* Read specs from a file if there is one.  */
 
 #ifdef FREEBSD_NATIVE
+  machine_suffix = "";
   just_machine_suffix = "";
 #else	/* FREEBSD_NATIVE */
   machine_suffix = concat (spec_machine, dir_separator_str,
--- gcc-print-search-dirs-null.diff ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list