Bug 23369 - The wrong search order for cpp
The wrong search order for cpp
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: gnupro (Show other bugs)
7.3
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-01-04 21:20 EST by Red Hat Bugzilla
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-05 12:22:48 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Here is a patch I am using. (73.61 KB, patch)
2001-01-05 12:22 EST, Red Hat Bugzilla
no flags Details | Diff

  None (edit)
Description Red Hat Bugzilla 2001-01-04 21:20:25 EST
I guess it is a long standing issue in the Cygnus toolchain. The
problem is this change:

--- gcc/configure.in    Fri Dec 22 13:55:48 2000
+++ gcc/configure.in    Thu Aug 17 12:02:45 2000
@@ -136,15 +136,17 @@ AC_ARG_WITH(elf,
 elf="$with_elf",
 elf=no)

-# Specify the local prefix
-local_prefix=
-AC_ARG_WITH(local-prefix,
-[  --with-local-prefix=DIR specifies directory to put local include.],
-[case "${withval}" in
-yes)   AC_MSG_ERROR(bad value ${withval} given for local include directory
prefix)
;;
-no)    ;;
-*)     local_prefix=$with_local_prefix ;;
-esac])
+# CYGNUS LOCAL: local_prefix
+#local_prefix=
+#AC_ARG_WITH(local-prefix,
+#[  --with-local-prefix=DIR specifies directory to put local include.],
+#[case "${withval}" in
+#yes)  AC_MSG_ERROR(bad value ${withval} given for local include directory
prefix)
;;
+#no)   ;;
+#*)    local_prefix=$with_local_prefix ;;
+#esac])
+local_prefix='$(prefix)'
+# END CYGNUS LOCAL

 # Default local prefix if it is empty
 if test x$local_prefix = x; then

Bascallly, it sets local_prefix == prefix, which means

$local_prefix/include == $prefix/include

It is ok and desirable for a cross toolchain as long as you don't
install it under /usr as a native compiler. Unfortunately, RedHat/ia64
does exactly that. That means $local_prefix/include == /usr/include.
Now, gcc will search /usr/include before others. It is not very good
for Linux.

# touch l.c
Reading specs from
/usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717/specs
gcc version 2.96-ia64-000717 snap 001117
 /usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717/cpp ...
GNU CPP version 2.96-ia64-000717 snap 001117 (cpplib)
 (IA-64)
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include
 /usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717/include
 /usr/ia64-redhat-linux/include
End of search list.
l.o: l.c
Comment 1 Red Hat Bugzilla 2001-01-05 07:30:10 EST
Bill, can you please revert this?
Comment 2 Red Hat Bugzilla 2001-01-05 12:22:45 EST
Created attachment 7103 [details]
Here is a patch I am using.
Comment 3 Red Hat Bugzilla 2001-01-06 17:15:14 EST
Will be fixed in gnupro-1117-3.

Note You need to log in before you can comment on or make changes to this bug.