Changeset ad31873f for scripts


Ignore:
Timestamp:
Mar 10, 2006, 2:25:11 PM (19 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
c9946b3
Parents:
14f25d6
Message:

r2539@server (orig r1260): ryan | 2006-03-10 06:07:41 -0800

r1336@rei: lfs | 2006-03-11 01:06:05 +1100
Add GCC PR20425 fixes to 4.1.0 release.
This fixes a multitude of sins, most noticably with libtool on multilib systems.
Iterative path searches the gcc driver performs should now search multilib directories first.


Submitted By: Ryan Oliver <ryan at pha dot com dot au>
Date: 2006-03-10
Initial Package Version: 4.1.0
Origin: GCC SVN Revision 108635 (diffed against 4.1.0 release)
Upstream Status: In GCC trunk
Description: Fix for PR20425


From http://gcc.gnu.org/ml/gcc-patches/2005-12/msg00818.html
---------------------------------8<------------------------------------
This gives the gcc driver a new path iteration function, for_each_path,
and uses it everywhere, making path iteration a little more consistent.
for_each_path uses the same path ordering as the existing find_file
function. I've also tweaked some of the existing find_a_file calls for
consistency, and uncovered and fixed some other bugs..


Functional changes are:


o %D library paths are printed in the same order as gcc uses elsewhere

when searching library directories, ie. all multilib paths are first.
http://gcc.gnu.org/ml/gcc-patches/2005-03/msg02044.html effectively
reverted by the rewrite because I believe the same speedup is gained
by searching the right dirs first.


o gcc -print-search-dirs prints library multilib paths followed by

non-multilib paths where before we just printed non-multilib paths.


o LIBRARY_PATH_ENV similarly includes multilib directories.


o All searches of startfile_prefixes now look in multilib dirs first

followed by non-multilib dirs. This changes the dirs we search for
spec files, and %include and %include_noerr in specs. Previously
we only searched the non-multilib dirs for specs files. I think this
change is worthwhile just for consistency, and the extension is
reasonable. For instance, it would allow different spec files to be
used for gcc -m64 vs. gcc -m32. However, if others think this wrong,
I won't argue. Consistency isn't everything.


o Some attempt made to prevent searching of duplicate paths. The old

find_file would search some paths twice (when multilib_dir was NULL
but multilib_os_dir non-NULL). We still search twice in some cases,
eg. /usr/lib/../lib and /usr/lib are considered different paths.


o find_a_file with last param (do_multi) true now searches both

multilib and non-multilib paths. Before, do_multi (well, the old
param name was multilib) meant just search multilib paths. This
isn't a user-visible change as the only place where find_a_file was
invoked with the last param true was from find_file, where we
immediately followed with a non-multilib find_a_file.


o Memory leaks fixed in is_directory.


o LIBRARY_PATH_ENV and COMPILER_PATH now only have existing

directories, making LIBRARY_PATH_ENV closer to %D paths. The
following lines (which I remove) in is_directory meant that
is_directory didn't do much for LIBRARY_PATH_ENV, except on
SMALL_ARG_MAX machines.


4278 ian #ifndef SMALL_ARG_MAX
4278 ian if (! linker)
4278 ian return 1;
4278 ian #endif


I'll also remove mention of SMALL_ARG_MAX in config and doc files
when I commit this change as this is the only place it is used.


o gcc -Bnon-dir-prefix- now works properly. The previously mentioned

is_directory peculiarity affected the following code.


43664 nickc /* Catch the case where the user has forgotten to append a
46063 jsm28 directory separator to the path. Note, they may be using
43664 nickc -B to add an executable name prefix, eg "i386-elf-", in
43664 nickc order to distinguish between multiple installations of
43664 nickc GCC in the same directory. Hence we must check to see
43664 nickc if appending a directory separator actually makes a
43664 nickc valid directory name. */
43664 nickc if (! IS_DIR_SEPARATOR (value [len - 1])
43664 nickc && is_directory (value, "", 0))
43664 nickc {
43767 ghazi char *tmp = xmalloc (len + 2);
43767 ghazi strcpy (tmp, value);
43767 ghazi tmp[len] = DIR_SEPARATOR;
43767 ghazi tmp[++ len] = 0;
43767 ghazi value = tmp;
43664 nickc }


Bootstrapped and regression tested powerpc64-linux and powerpc-linux on
a previous iteration of this patch missing is_directory fixes.
Currently running tests on this patch.



Location:
scripts
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • scripts/scripts/cross-scripts/cross-gcc-final.sh

    r14f25d6 rad31873f  
    102102      apply_patch gcc-4.0.0-clean_exec_and_lib_search_paths_when_cross-1
    103103   ;;
     104   4.1.0 )
     105      apply_patch gcc-4.0.0-clean_exec_and_lib_search_paths_when_cross-1
     106      apply_patch gcc-4.1.0-fix_PR20425
     107   ;;
    104108   4.0.* | 4.1.* )
    105109      apply_patch gcc-4.0.0-clean_exec_and_lib_search_paths_when_cross-1
  • scripts/scripts/cross-scripts/cross-gcc-shared.sh

    r14f25d6 rad31873f  
    9393      apply_patch gcc-4.0.0-clean_exec_and_lib_search_paths_when_cross-1
    9494   ;;
     95   4.1.0 )
     96      apply_patch gcc-4.0.0-clean_exec_and_lib_search_paths_when_cross-1
     97      apply_patch gcc-4.1.0-fix_PR20425
     98   ;;
    9599   4.0.* | 4.1.* )
    96100      apply_patch gcc-4.0.0-clean_exec_and_lib_search_paths_when_cross-1
  • scripts/scripts/cross-scripts/cross-gcc-static-no-thread.sh

    r14f25d6 rad31873f  
    7373cd ${SRC}/${PKGDIR}
    7474case ${target_gcc_ver} in
    75    3.4.3 ) apply_patch gcc-3.4.3-linkonce-1
    76            apply_patch gcc-3.4.0-arm-bigendian
    77            apply_patch gcc-3.4.0-arm-nolibfloat
    78            apply_patch gcc-3.4.0-arm-lib1asm
    79            apply_patch gcc-3.4.3-clean_exec_and_lib_search_paths_when_cross-1
     75   3.4.3 )
     76      apply_patch gcc-3.4.3-linkonce-1
     77      apply_patch gcc-3.4.0-arm-bigendian
     78      apply_patch gcc-3.4.0-arm-nolibfloat
     79      apply_patch gcc-3.4.0-arm-lib1asm
     80      apply_patch gcc-3.4.3-clean_exec_and_lib_search_paths_when_cross-1
    8081   ;;
    81    4.0.0 ) apply_patch gcc-4.0.0-fix_tree_optimisation_PR21173
    82            apply_patch gcc-4.0.0-reload_check_uninitialized_pseudos_PR20973
    83            apply_patch gcc-4.0.0-clean_exec_and_lib_search_paths_when_cross-1
     82   4.0.0 )
     83      apply_patch gcc-4.0.0-fix_tree_optimisation_PR21173
     84      apply_patch gcc-4.0.0-reload_check_uninitialized_pseudos_PR20973
     85      apply_patch gcc-4.0.0-clean_exec_and_lib_search_paths_when_cross-1
     86   ;;
     87   4.1.0 )
     88      apply_patch gcc-4.0.0-clean_exec_and_lib_search_paths_when_cross-1
     89      apply_patch gcc-4.1.0-fix_PR20425
     90   ;;
     91   4.0.* | 4.1.* )
     92      apply_patch gcc-4.0.0-clean_exec_and_lib_search_paths_when_cross-1
    8493   ;;
    8594esac
  • scripts/scripts/cross-scripts/cross-gcc-static.sh

    r14f25d6 rad31873f  
    9090      apply_patch gcc-4.0.0-clean_exec_and_lib_search_paths_when_cross-1
    9191   ;;
     92   4.1.0 )
     93      apply_patch gcc-4.0.0-clean_exec_and_lib_search_paths_when_cross-1
     94      apply_patch gcc-4.1.0-fix_PR20425
     95   ;;
    9296   4.0.* | 4.1.* )
    9397      apply_patch gcc-4.0.0-clean_exec_and_lib_search_paths_when_cross-1
  • scripts/scripts/native-scripts/native-gcc.sh

    r14f25d6 rad31873f  
    8787      apply_patch gcc-4.0.0-reload_check_uninitialized_pseudos_PR20973
    8888      apply_patch gcc-4.0.0-remove_standard_startfile_prefix_from_startfile_prefixes-1
     89   ;;
     90   4.1.0 )
     91      apply_patch gcc-4.0.0-clean_exec_and_lib_search_paths_when_cross-1
     92      apply_patch gcc-4.1.0-fix_PR20425
    8993   ;;
    9094   4.0.* | 4.1.* )
  • scripts/scripts/target-scripts/target-gcc.sh

    r14f25d6 rad31873f  
    102102      apply_patch gcc-4.0.0-reload_check_uninitialized_pseudos_PR20973
    103103      apply_patch gcc-4.0.0-clean_exec_and_lib_search_paths_when_cross-1
     104   ;;
     105   4.1.0 )
     106      apply_patch gcc-4.0.0-clean_exec_and_lib_search_paths_when_cross-1
     107      apply_patch gcc-4.1.0-fix_PR20425
    104108   ;;
    105109   4.0.* | 4.1.* )
Note: See TracChangeset for help on using the changeset viewer.