1994-06-15 10:01:42 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# Generates multilib.h.
|
2014-01-02 23:23:26 +01:00
|
|
|
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
1994-06-15 10:01:42 +02:00
|
|
|
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
#This file is part of GCC.
|
1994-06-15 10:01:42 +02:00
|
|
|
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
#GCC is free software; you can redistribute it and/or modify it under
|
|
|
|
#the terms of the GNU General Public License as published by the Free
|
2007-07-26 10:37:01 +02:00
|
|
|
#Software Foundation; either version 3, or (at your option) any later
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
#version.
|
1994-06-15 10:01:42 +02:00
|
|
|
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
#GCC is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
#FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
#for more details.
|
1994-06-15 10:01:42 +02:00
|
|
|
|
|
|
|
#You should have received a copy of the GNU General Public License
|
2007-07-26 10:37:01 +02:00
|
|
|
#along with GCC; see the file COPYING3. If not see
|
|
|
|
#<http://www.gnu.org/licenses/>.
|
1994-06-15 10:01:42 +02:00
|
|
|
|
|
|
|
# This shell script produces a header file which the gcc driver
|
|
|
|
# program uses to pick which library to use based on the machine
|
|
|
|
# specific options that it is given.
|
|
|
|
|
|
|
|
# The first argument is a list of sets of options. The elements in
|
|
|
|
# the list are separated by spaces. Within an element, the options
|
1999-12-09 11:41:45 +01:00
|
|
|
# are separated by slashes or pipes. No leading dash is used on the
|
|
|
|
# options.
|
|
|
|
# Each option in a set separated by slashes is mutually incompatible
|
|
|
|
# with all other options
|
1994-06-15 10:01:42 +02:00
|
|
|
# in the set.
|
1999-12-09 11:41:45 +01:00
|
|
|
# Each option in a set separated by pipes will be used for the library
|
|
|
|
# compilation and any of the options in the set will be sufficient
|
|
|
|
# for it to be triggered.
|
1994-06-15 10:01:42 +02:00
|
|
|
|
|
|
|
# The optional second argument is a list of subdirectory names. If
|
|
|
|
# the second argument is non-empty, there must be as many elements in
|
|
|
|
# the second argument as there are options in the first argument. The
|
|
|
|
# elements in the second list are separated by spaces. If the second
|
|
|
|
# argument is empty, the option names will be used as the directory
|
|
|
|
# names.
|
|
|
|
|
|
|
|
# The optional third argument is a list of options which are
|
|
|
|
# identical. The elements in the list are separated by spaces. Each
|
|
|
|
# element must be of the form OPTION=OPTION. The first OPTION should
|
|
|
|
# appear in the first argument, and the second should be a synonym for
|
1995-05-10 20:26:30 +02:00
|
|
|
# it. Question marks are replaced with equal signs in both options.
|
1994-06-15 10:01:42 +02:00
|
|
|
|
1995-11-30 18:49:53 +01:00
|
|
|
# The optional fourth argument is a list of multilib directory
|
|
|
|
# combinations that should not be built.
|
|
|
|
|
1996-08-12 18:36:42 +02:00
|
|
|
# The optional fifth argument is a list of options that should be
|
|
|
|
# used whenever building multilib libraries.
|
|
|
|
|
2000-03-06 19:05:52 +01:00
|
|
|
# The optional sixth argument is a list of exclusions used internally by
|
|
|
|
# the compiler similar to exceptions. The difference being that exclusions
|
|
|
|
# allow matching default options that genmultilib does not know about and
|
|
|
|
# is done at runtime as opposed to being sorted out at compile time.
|
acinclude.m4: Fix spelling error of "separate" as "seperate".
config:
* acinclude.m4: Fix spelling error of "separate" as "seperate".
gcc:
* ChangeLog.2, c-decl.c, config/i386/i386.md, doc/gcc.texi, gcc.c,
genmultilib, toplev.c: Fix spelling errors of "separate" as
"seperate", and corresponding spelling errors of related words.
gcc/ada:
* 5oosinte.adb: Fix spelling error of "separate" as "seperate".
gcc/testsuite:
* gcc.c-torture/unsorted/unsorted.exp, lib/file-format.exp: Fix
spelling errors of "separate" as "seperate".
libffi:
* src/x86/ffi.c: Fix spelling error of "separate" as "seperate".
libjava:
* defineclass.cc, java/awt/image/ColorModel.java,
java/awt/image/SampleModel.java, java/lang/Package.java,
java/security/cert/X509Extension.java: Fix spelling errors of
"separate" as "seperate", and corresponding spelling errors of
related words.
libstdc++-v3:
* docs/html/22_locale/locale.html, docs/html/faq/index.html: Fix
spelling errors of "separate" as "seperate", and corresponding
spelling errors of related words.
* docs/html/faq/index.txt: Regenerate.
From-SVN: r46063
2001-10-07 20:02:46 +02:00
|
|
|
# Each element in the list is a separate exclusion rule. Each rule is
|
|
|
|
# a list of options (sans preceding '-') separated by a '/'. The options
|
2000-03-06 19:05:52 +01:00
|
|
|
# on the rule are grouped as an AND operation, and all options much match
|
|
|
|
# for the rule to exclude a set. Options can be preceded with a '!' to
|
|
|
|
# match a logical NOT.
|
|
|
|
|
2003-10-23 07:16:56 +02:00
|
|
|
# The optional seventh argument is a list of OS subdirectory names.
|
|
|
|
# The format is either the same as of the second argument, or a set of
|
|
|
|
# mappings. When it is the same as the second argument, it describes
|
|
|
|
# the multilib directories using OS conventions, rather than GCC
|
|
|
|
# conventions. When it is a set of mappings of the form gccdir=osdir,
|
|
|
|
# the left side gives the GCC convention and the right gives the
|
|
|
|
# equivalent OS defined location. If the osdir part begins with a !,
|
|
|
|
# the os directory names are used exclusively. Use the mapping when
|
|
|
|
# there is no one-to-one equivalence between GCC levels and the OS.
|
gcc.c (print_multi_os_directory): New variable.
* gcc.c (print_multi_os_directory): New variable.
(option_map): Support --print-multi-os-directory.
(struct prefix_list): Add os_multilib field.
(multilib_os_dir): New variable.
(static_specs): Add multilib_options.
(find_a_file): Add multilib argument. Search in GCC or OS multilib
subdirs if non-zero.
(read_specs, execute): Update callers.
(find_file): Likewise. Don't prefix name with multilib_dir, instead
pass 1 as multilib option.
(display_help): Include --print-multi-os-directory.
(add_prefix): Add os_multilib argument. Initialize pl->os_multilib.
(process_command): Update callers. Handle --print-multi-os-directory.
(do_spec_1) ['D']: Use multilib_os_directory if pl->os_multilib is
set.
(main): Update find_a_file and add_prefix callers.
Handle print_multi_os_directory.
(struct mdswitchstr): New.
(mdswitches, n_mdswitches): New variables.
(used_arg): Add MULTILIB_DEFAULT switches too if they are not
present on the command line nor their mutually incompatible
switches.
(default_arg): Optimize.
(set_multilib_dir): Compute multilib_os_dir. Initialize mdswitches
array.
(print_multilib_info): Only print GCC multilib dir name, not OS
multilib dirname.
* genmultilib: Add osdirnames parameter. Output multilib_options
variable. If osdirnames is specified, output dirnames as
dirname:osdirname.
* mklibgcc.in: Use MULTILIB_OSDIRNAMES, --print-multi-directory
and --print-multi-os-directory instead of SHLIB_SLIBDIR_SUFFIXES
to compute libgcc_s soname and install path.
* Makefile.in (libgcc.mk): Pass MULTILIB_OSDIRNAMES instead of
SHLIB_SLIBDIR_SUFFIXES to mklibgcc.
(s_mlib): Pass MULTILIB_OSDIRNAMES or nothing as last genmultilib
argument.
* config/sparc/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64,
ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_COMMON): Remove.
(STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between -m32
and -m64.
* config/sparc/t-sol2-64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/sol2-bi.h (STARTFILE_ARCH64_SPEC): Remove.
(STARTFILE_ARCH_SPEC): Remove.
* config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Remove.
* config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
From-SVN: r57786
2002-10-03 22:35:14 +02:00
|
|
|
|
2012-05-09 13:38:47 +02:00
|
|
|
# The optional eighth argument which intends to reduce the effort to write
|
|
|
|
# so many MULTILIB_EXCEPTIONS rules. This option defines a series of option
|
|
|
|
# combinations that we actually required.
|
|
|
|
# For some cases, the generated option combinations are far more than what
|
|
|
|
# we need, we have to write a lot of rules to screen out combinations we
|
|
|
|
# don't need. If we missed some rules, the unexpected libraries will be built.
|
|
|
|
# Now with this argument, one can simply give what combinations are needed.
|
|
|
|
# It is pretty straigtforward.
|
|
|
|
# This argument can be used together with MULTILIB_EXCEPTIONS and will take
|
|
|
|
# effect after the MULTILIB_EXCEPTIONS.
|
|
|
|
|
2012-11-14 22:29:15 +01:00
|
|
|
# The optional ninth argument is the multiarch name.
|
|
|
|
|
2013-01-13 11:12:07 +01:00
|
|
|
# The optional tenth argument specifies how to reuse multilib for different
|
|
|
|
# option sets.
|
|
|
|
|
2002-10-05 20:55:54 +02:00
|
|
|
# The last option should be "yes" if multilibs are enabled. If it is not
|
|
|
|
# "yes", all GCC multilib dir names will be ".".
|
|
|
|
|
1994-06-15 10:01:42 +02:00
|
|
|
# The output looks like
|
|
|
|
# #define MULTILIB_MATCHES "\
|
|
|
|
# SUBDIRECTORY OPTIONS;\
|
|
|
|
# ...
|
|
|
|
# "
|
|
|
|
# The SUBDIRECTORY is the subdirectory to use. The OPTIONS are
|
|
|
|
# multiple options separated by spaces. Each option may start with an
|
|
|
|
# exclamation point. gcc will consider each line in turn. If none of
|
|
|
|
# the options beginning with an exclamation point are present, and all
|
|
|
|
# of the other options are present, that subdirectory will be used.
|
|
|
|
# The order of the subdirectories is such that they can be created in
|
|
|
|
# order; that is, a subdirectory is preceded by all its parents.
|
|
|
|
|
2000-03-06 19:05:52 +01:00
|
|
|
# Here is an example (this is from the actual sparc64 case):
|
|
|
|
# genmultilib 'm64/m32 mno-app-regs|mcmodel=medany' '64 32 alt'
|
|
|
|
# 'mcmodel?medany=mcmodel?medmid' 'm32/mno-app-regs* m32/mcmodel=*'
|
gcc.c (print_multi_os_directory): New variable.
* gcc.c (print_multi_os_directory): New variable.
(option_map): Support --print-multi-os-directory.
(struct prefix_list): Add os_multilib field.
(multilib_os_dir): New variable.
(static_specs): Add multilib_options.
(find_a_file): Add multilib argument. Search in GCC or OS multilib
subdirs if non-zero.
(read_specs, execute): Update callers.
(find_file): Likewise. Don't prefix name with multilib_dir, instead
pass 1 as multilib option.
(display_help): Include --print-multi-os-directory.
(add_prefix): Add os_multilib argument. Initialize pl->os_multilib.
(process_command): Update callers. Handle --print-multi-os-directory.
(do_spec_1) ['D']: Use multilib_os_directory if pl->os_multilib is
set.
(main): Update find_a_file and add_prefix callers.
Handle print_multi_os_directory.
(struct mdswitchstr): New.
(mdswitches, n_mdswitches): New variables.
(used_arg): Add MULTILIB_DEFAULT switches too if they are not
present on the command line nor their mutually incompatible
switches.
(default_arg): Optimize.
(set_multilib_dir): Compute multilib_os_dir. Initialize mdswitches
array.
(print_multilib_info): Only print GCC multilib dir name, not OS
multilib dirname.
* genmultilib: Add osdirnames parameter. Output multilib_options
variable. If osdirnames is specified, output dirnames as
dirname:osdirname.
* mklibgcc.in: Use MULTILIB_OSDIRNAMES, --print-multi-directory
and --print-multi-os-directory instead of SHLIB_SLIBDIR_SUFFIXES
to compute libgcc_s soname and install path.
* Makefile.in (libgcc.mk): Pass MULTILIB_OSDIRNAMES instead of
SHLIB_SLIBDIR_SUFFIXES to mklibgcc.
(s_mlib): Pass MULTILIB_OSDIRNAMES or nothing as last genmultilib
argument.
* config/sparc/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64,
ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_COMMON): Remove.
(STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between -m32
and -m64.
* config/sparc/t-sol2-64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/sol2-bi.h (STARTFILE_ARCH64_SPEC): Remove.
(STARTFILE_ARCH_SPEC): Remove.
* config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Remove.
* config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
From-SVN: r57786
2002-10-03 22:35:14 +02:00
|
|
|
# '' 'm32/!m64/mno-app-regs m32/!m64/mcmodel=medany'
|
2013-01-13 11:12:07 +01:00
|
|
|
# '../lib64 ../lib32 alt' '' '' '' yes
|
1994-06-15 10:01:42 +02:00
|
|
|
# This produces:
|
2000-03-06 19:05:52 +01:00
|
|
|
# ". !m64 !m32 !mno-app-regs !mcmodel=medany;",
|
gcc.c (print_multi_os_directory): New variable.
* gcc.c (print_multi_os_directory): New variable.
(option_map): Support --print-multi-os-directory.
(struct prefix_list): Add os_multilib field.
(multilib_os_dir): New variable.
(static_specs): Add multilib_options.
(find_a_file): Add multilib argument. Search in GCC or OS multilib
subdirs if non-zero.
(read_specs, execute): Update callers.
(find_file): Likewise. Don't prefix name with multilib_dir, instead
pass 1 as multilib option.
(display_help): Include --print-multi-os-directory.
(add_prefix): Add os_multilib argument. Initialize pl->os_multilib.
(process_command): Update callers. Handle --print-multi-os-directory.
(do_spec_1) ['D']: Use multilib_os_directory if pl->os_multilib is
set.
(main): Update find_a_file and add_prefix callers.
Handle print_multi_os_directory.
(struct mdswitchstr): New.
(mdswitches, n_mdswitches): New variables.
(used_arg): Add MULTILIB_DEFAULT switches too if they are not
present on the command line nor their mutually incompatible
switches.
(default_arg): Optimize.
(set_multilib_dir): Compute multilib_os_dir. Initialize mdswitches
array.
(print_multilib_info): Only print GCC multilib dir name, not OS
multilib dirname.
* genmultilib: Add osdirnames parameter. Output multilib_options
variable. If osdirnames is specified, output dirnames as
dirname:osdirname.
* mklibgcc.in: Use MULTILIB_OSDIRNAMES, --print-multi-directory
and --print-multi-os-directory instead of SHLIB_SLIBDIR_SUFFIXES
to compute libgcc_s soname and install path.
* Makefile.in (libgcc.mk): Pass MULTILIB_OSDIRNAMES instead of
SHLIB_SLIBDIR_SUFFIXES to mklibgcc.
(s_mlib): Pass MULTILIB_OSDIRNAMES or nothing as last genmultilib
argument.
* config/sparc/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64,
ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_COMMON): Remove.
(STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between -m32
and -m64.
* config/sparc/t-sol2-64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/sol2-bi.h (STARTFILE_ARCH64_SPEC): Remove.
(STARTFILE_ARCH_SPEC): Remove.
* config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Remove.
* config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
From-SVN: r57786
2002-10-03 22:35:14 +02:00
|
|
|
# "64:../lib64 m64 !m32 !mno-app-regs !mcmodel=medany;",
|
|
|
|
# "32:../lib32 !m64 m32 !mno-app-regs !mcmodel=medany;",
|
2000-03-06 19:05:52 +01:00
|
|
|
# "alt !m64 !m32 mno-app-regs mcmodel=medany;",
|
|
|
|
# "alt !m64 !m32 mno-app-regs !mcmodel=medany;",
|
|
|
|
# "alt !m64 !m32 !mno-app-regs mcmodel=medany;",
|
gcc.c (print_multi_os_directory): New variable.
* gcc.c (print_multi_os_directory): New variable.
(option_map): Support --print-multi-os-directory.
(struct prefix_list): Add os_multilib field.
(multilib_os_dir): New variable.
(static_specs): Add multilib_options.
(find_a_file): Add multilib argument. Search in GCC or OS multilib
subdirs if non-zero.
(read_specs, execute): Update callers.
(find_file): Likewise. Don't prefix name with multilib_dir, instead
pass 1 as multilib option.
(display_help): Include --print-multi-os-directory.
(add_prefix): Add os_multilib argument. Initialize pl->os_multilib.
(process_command): Update callers. Handle --print-multi-os-directory.
(do_spec_1) ['D']: Use multilib_os_directory if pl->os_multilib is
set.
(main): Update find_a_file and add_prefix callers.
Handle print_multi_os_directory.
(struct mdswitchstr): New.
(mdswitches, n_mdswitches): New variables.
(used_arg): Add MULTILIB_DEFAULT switches too if they are not
present on the command line nor their mutually incompatible
switches.
(default_arg): Optimize.
(set_multilib_dir): Compute multilib_os_dir. Initialize mdswitches
array.
(print_multilib_info): Only print GCC multilib dir name, not OS
multilib dirname.
* genmultilib: Add osdirnames parameter. Output multilib_options
variable. If osdirnames is specified, output dirnames as
dirname:osdirname.
* mklibgcc.in: Use MULTILIB_OSDIRNAMES, --print-multi-directory
and --print-multi-os-directory instead of SHLIB_SLIBDIR_SUFFIXES
to compute libgcc_s soname and install path.
* Makefile.in (libgcc.mk): Pass MULTILIB_OSDIRNAMES instead of
SHLIB_SLIBDIR_SUFFIXES to mklibgcc.
(s_mlib): Pass MULTILIB_OSDIRNAMES or nothing as last genmultilib
argument.
* config/sparc/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64,
ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_COMMON): Remove.
(STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between -m32
and -m64.
* config/sparc/t-sol2-64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/sol2-bi.h (STARTFILE_ARCH64_SPEC): Remove.
(STARTFILE_ARCH_SPEC): Remove.
* config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Remove.
* config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
From-SVN: r57786
2002-10-03 22:35:14 +02:00
|
|
|
# "64/alt:../lib64/alt m64 !m32 mno-app-regs mcmodel=medany;",
|
|
|
|
# "64/alt:../lib64/alt m64 !m32 mno-app-regs !mcmodel=medany;",
|
|
|
|
# "64/alt:../lib64/alt m64 !m32 !mno-app-regs mcmodel=medany;",
|
1996-06-08 04:45:34 +02:00
|
|
|
#
|
2000-03-06 19:05:52 +01:00
|
|
|
# The effect is that `gcc -mno-app-regs' (for example) will append "alt"
|
|
|
|
# to the directory name when searching for libraries or startup files and
|
|
|
|
# `gcc -m32 -mcmodel=medany' (for example) will append "32/alt". Also note
|
|
|
|
# that exclusion above is moot, unless the compiler had a default of -m32,
|
|
|
|
# which would mean that all of the "alt" directories (not the 64/alt ones)
|
|
|
|
# would be ignored (not generated, nor used) since the exclusion also
|
|
|
|
# matches the multilib_default args.
|
1994-06-15 10:01:42 +02:00
|
|
|
|
|
|
|
# Copy the positional parameters into variables.
|
|
|
|
options=$1
|
|
|
|
dirnames=$2
|
|
|
|
matches=$3
|
1995-11-30 18:49:53 +01:00
|
|
|
exceptions=$4
|
1996-08-12 18:36:42 +02:00
|
|
|
extra=$5
|
2000-03-06 19:05:52 +01:00
|
|
|
exclusions=$6
|
gcc.c (print_multi_os_directory): New variable.
* gcc.c (print_multi_os_directory): New variable.
(option_map): Support --print-multi-os-directory.
(struct prefix_list): Add os_multilib field.
(multilib_os_dir): New variable.
(static_specs): Add multilib_options.
(find_a_file): Add multilib argument. Search in GCC or OS multilib
subdirs if non-zero.
(read_specs, execute): Update callers.
(find_file): Likewise. Don't prefix name with multilib_dir, instead
pass 1 as multilib option.
(display_help): Include --print-multi-os-directory.
(add_prefix): Add os_multilib argument. Initialize pl->os_multilib.
(process_command): Update callers. Handle --print-multi-os-directory.
(do_spec_1) ['D']: Use multilib_os_directory if pl->os_multilib is
set.
(main): Update find_a_file and add_prefix callers.
Handle print_multi_os_directory.
(struct mdswitchstr): New.
(mdswitches, n_mdswitches): New variables.
(used_arg): Add MULTILIB_DEFAULT switches too if they are not
present on the command line nor their mutually incompatible
switches.
(default_arg): Optimize.
(set_multilib_dir): Compute multilib_os_dir. Initialize mdswitches
array.
(print_multilib_info): Only print GCC multilib dir name, not OS
multilib dirname.
* genmultilib: Add osdirnames parameter. Output multilib_options
variable. If osdirnames is specified, output dirnames as
dirname:osdirname.
* mklibgcc.in: Use MULTILIB_OSDIRNAMES, --print-multi-directory
and --print-multi-os-directory instead of SHLIB_SLIBDIR_SUFFIXES
to compute libgcc_s soname and install path.
* Makefile.in (libgcc.mk): Pass MULTILIB_OSDIRNAMES instead of
SHLIB_SLIBDIR_SUFFIXES to mklibgcc.
(s_mlib): Pass MULTILIB_OSDIRNAMES or nothing as last genmultilib
argument.
* config/sparc/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64,
ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_COMMON): Remove.
(STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between -m32
and -m64.
* config/sparc/t-sol2-64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/sol2-bi.h (STARTFILE_ARCH64_SPEC): Remove.
(STARTFILE_ARCH_SPEC): Remove.
* config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Remove.
* config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
From-SVN: r57786
2002-10-03 22:35:14 +02:00
|
|
|
osdirnames=$7
|
2012-05-09 13:38:47 +02:00
|
|
|
multilib_required=$8
|
2012-11-14 22:29:15 +01:00
|
|
|
multiarch=$9
|
2013-01-13 11:12:07 +01:00
|
|
|
multilib_reuse=${10}
|
|
|
|
enable_multilib=${11}
|
1996-08-12 18:36:42 +02:00
|
|
|
|
top level:
* Makefile.in (WARN_CFLAGS): Add -Wwrite-strings.
(tree.o): Depend on output.h.
* c-decl.c (pending_invalid_xref_file,
current_function_prototype_file): Constify.
(pushdecl): Constify a local char *.
(define_label): Constify filename parameter.
* c-lex.c (init_parse): Constify parameter and return value.
* c-typeck.c (c_expand_asm_operands): Constify filename parameter.
* c-tree.h: Update prototypes.
* c-parse.in: Constify filename member of %union, and if_stmt_file.
* c-parse.y, c-parse.c, c-parse.h, objc/objc-parse.y,
objc/objc-parse.c: Regenerate.
* dwarfout.c (dwarfout_init): Constify main_input_filename parameter.
* dwarfout.h: Update prototypes.
* expr.c (expand_expr): Constify a local char *.
* flags.h: Constify main_input_filename.
* function.c (expand_function_end): Constify filename parameter.
* genrecog.c (make_insn_sequence): Use a character array for
c_test_pos.
(main): Remove unused variables.
* input.h: Constify input_filename, main_input_filename, and
file_stack.name. Update prototypes.
* output.h: Declare first_global_object_name and
weak_global_object_name here, as const char *.
* stmt.c (expand_asm_operands): Constify filename parameter.
* toplev.c (compile_file, push_srcloc, debug_start_source_file):
Constify filename parameter.
(input_filename, main_input_filename): Constify.
* toplev.h: Update prototypes.
* tree.c: Include output.h. Don't declare
first_global_object_name or weak_global_object_name. Clean up string
bashing in get_file_function_name_long.
* tree.h (struct tree_decl): Constify filename member.
(input_filename): Constify.
Update prototypes.
* varasm.c (first_global_object_name, weak_global_object_name):
Constify.
(assemble_start_function, assemble_variable): Clean up string bashing.
* gcc.c: Constify all spec-related strings initialized,
transitively, from string constants. Constify all strings
and string variables related to multilibs.
(set_spec, read_specs): Cast argument to free to PTR.
(used_arg): Do not modify multilib_matches. Use strncmp plus
length comparison to compare multilib switches.
* genmultilib: Constify everything declared in multilib.h.
ch:
* ch-tree.h: Update prototypes. Remove prototypes for
functions declared elsewhere.
* decl.c (define_label): Constify filename parameter.
* grant.c (globalize_decl, set_default_grant_file): Constify
local char * variables. Don't declare
first_global_object_name or asm_out_file.
* lang.c (chill_real_input_filename): Constify.
* lex.c (init_parse): Constify parameter and return value.
* parse.c: Don't declare input_filename.
(ch_expand_asm_operands): Constify filename parameter.
(parse_multi_dimension_case_action): Constify local char *.
* satisfy.c (safe_satisfy_decl): Constify local char *.
cp:
* cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
and pending_inline.filename. Update prototypes.
* decl.c (define_label): Constify filename parameter.
* decl2.c (warn_if_unknown_interface): Constify local char *.
* input.c Constify input_source.filename. Don't declare
input_filename or lineno. Constify filename parameter to feed_input.
* lex.c (init_parse): Constify parameter and return value.
(cp_pragma_interface, cp_pragma_implementation): Constify
filename argument.
(reinit_parse_for_method, reinit_parse_for_block,
reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
Constify local char *.
* pt.c: Don't declare lineno or input_filename.
(print_template_context, tsubst_friend_function, tsubst_decl,
tsubst, instantiate_decl): Constify local char *.
* semantics.c (expand_body): Constify local char *.
* tree.c (build_srcloc): Constify filename parameter.
* typeck.c (c_expand_asm_operands): Constify filename
parameter.
f:
* com.c (ffecom_subscript_check_): Constify array_name
parameter. Clean up string bashing.
(ffecom_arrayref_, ffecom_char_args_x_): Constify array_name
parameter.
(ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_,
ffecom_sym_transform_, ffecom_sym_transform_assign_): Constify
local char *.
(init_parse): Constify parameter and return value.
* lex.c: Include dwarfout.h instead of prototyping dwarfout_*
functions here.
(ffelex_file_pop_, ffelex_file_push_): Constify filename parameter.
(ffelex_hash_, ffelex_include_): Constify local char *.
* std.c (ffestd_exec_end): Constify local char *.
* where.c (ffewhere_file_new): Constify filename parameter.
* where.h: Update prototypes.
java:
* check_init.c (check_init): Constify local char *.
* class.c (push_class): Constify local char *.
* java_tree.h: Update prototypes.
* jcf-io.c (open_class): Constify filename parameter and
return value.
(find_class): Remove redundant string copy. Cast return from
open_class.
* jcf-parse.c (read_class, parse_class_file, yyparse):
Constify local char *.
* jcf-write.c (generate_bytecode_insns, generate_classfile):
Constify local char *.
* jcf.h (JCF): Constify filename and classname.
(JCF_FINISH): Cast args to FREE to char * when appropriate.
* lang.c (init_parse): Constify parameter and return value.
* lex.c (java_get_line_col): Constify filename parameter.
* parse.h: Constify parser_ctxt.filename. Update prototypes.
* parse.y (java_parser_context_suspend,
issue_warning_error_from_context, safe_layout_class): Constify
local char *.
* parse.c: Regenerate.
From-SVN: r33804
2000-05-09 21:56:01 +02:00
|
|
|
echo "static const char *const multilib_raw[] = {"
|
1994-06-15 10:01:42 +02:00
|
|
|
|
2002-12-17 06:23:07 +01:00
|
|
|
mkdir tmpmultilib.$$ || exit 1
|
2002-12-17 22:17:35 +01:00
|
|
|
# Use cd ./foo to avoid CDPATH output.
|
|
|
|
cd ./tmpmultilib.$$ || exit 1
|
2002-12-17 06:23:07 +01:00
|
|
|
|
1994-06-15 10:01:42 +02:00
|
|
|
# What we want to do is select all combinations of the sets in
|
|
|
|
# options. Each combination which includes a set of mutually
|
|
|
|
# exclusive options must then be output multiple times, once for each
|
|
|
|
# item in the set. Selecting combinations is a recursive process.
|
|
|
|
# Since not all versions of sh support functions, we achieve recursion
|
|
|
|
# by creating a temporary shell script which invokes itself.
|
|
|
|
rm -f tmpmultilib
|
|
|
|
cat >tmpmultilib <<\EOF
|
|
|
|
#!/bin/sh
|
|
|
|
# This recursive script basically outputs all combinations of its
|
|
|
|
# input arguments, handling mutually exclusive sets of options by
|
|
|
|
# repetition. When the script is called, ${initial} is the list of
|
|
|
|
# options which should appear before all combinations this will
|
|
|
|
# output. The output looks like a list of subdirectory names with
|
|
|
|
# leading and trailing slashes.
|
|
|
|
if [ "$#" != "0" ]; then
|
|
|
|
first=$1
|
|
|
|
shift
|
1999-12-09 11:41:45 +01:00
|
|
|
case "$first" in
|
|
|
|
*\|*)
|
|
|
|
all=${initial}`echo $first | sed -e 's_|_/_'g`
|
|
|
|
first=`echo $first | sed -e 's_|_ _'g`
|
|
|
|
echo ${all}/
|
|
|
|
initial="${initial}${all}/" ./tmpmultilib $@
|
|
|
|
./tmpmultilib $first $@ | grep -v "^${all}"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
for opt in `echo $first | sed -e 's|/| |'g`; do
|
|
|
|
echo ${initial}${opt}/
|
|
|
|
done
|
|
|
|
./tmpmultilib $@
|
|
|
|
for opt in `echo $first | sed -e 's|/| |'g`; do
|
|
|
|
initial="${initial}${opt}/" ./tmpmultilib $@
|
|
|
|
done
|
|
|
|
esac
|
1994-06-15 10:01:42 +02:00
|
|
|
fi
|
|
|
|
EOF
|
|
|
|
chmod +x tmpmultilib
|
|
|
|
|
|
|
|
combinations=`initial=/ ./tmpmultilib ${options}`
|
|
|
|
|
1995-11-30 18:49:53 +01:00
|
|
|
# If there exceptions, weed them out now
|
|
|
|
if [ -n "${exceptions}" ]; then
|
|
|
|
cat >tmpmultilib2 <<\EOF
|
|
|
|
#!/bin/sh
|
|
|
|
# This recursive script weeds out any combination of multilib
|
|
|
|
# switches that should not be generated. The output looks like
|
|
|
|
# a list of subdirectory names with leading and trailing slashes.
|
|
|
|
|
|
|
|
for opt in $@; do
|
|
|
|
case "$opt" in
|
|
|
|
EOF
|
|
|
|
|
|
|
|
for except in ${exceptions}; do
|
|
|
|
echo " /${except}/) : ;;" >> tmpmultilib2
|
|
|
|
done
|
|
|
|
|
|
|
|
cat >>tmpmultilib2 <<\EOF
|
|
|
|
*) echo ${opt};;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
EOF
|
|
|
|
chmod +x tmpmultilib2
|
|
|
|
combinations=`./tmpmultilib2 ${combinations}`
|
|
|
|
fi
|
|
|
|
|
2012-05-09 13:38:47 +02:00
|
|
|
# If the MULTILIB_REQUIRED list are provided,
|
|
|
|
# filter out combinations not in this list.
|
|
|
|
if [ -n "${multilib_required}" ]; then
|
|
|
|
cat >tmpmultilib2 <<\EOF
|
|
|
|
#!/bin/sh
|
|
|
|
# This recursive script weeds out any combination of multilib
|
|
|
|
# switches that not in the expected list.
|
|
|
|
|
|
|
|
for opt in $@; do
|
|
|
|
case "$opt" in
|
|
|
|
EOF
|
|
|
|
|
|
|
|
for expect in ${multilib_required}; do
|
|
|
|
echo " /${expect}/) echo \${opt};;" >> tmpmultilib2
|
|
|
|
done
|
|
|
|
|
|
|
|
cat >>tmpmultilib2 <<\EOF
|
|
|
|
*) ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod +x tmpmultilib2
|
|
|
|
combinations=`./tmpmultilib2 ${combinations}`
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
1994-06-15 10:01:42 +02:00
|
|
|
# Construct a sed pattern which will convert option names to directory
|
|
|
|
# names.
|
|
|
|
todirnames=
|
|
|
|
if [ -n "${dirnames}" ]; then
|
|
|
|
set x ${dirnames}
|
|
|
|
shift
|
|
|
|
for set in ${options}; do
|
1999-12-09 11:41:45 +01:00
|
|
|
for opts in `echo ${set} | sed -e 's|/| |'g`; do
|
|
|
|
patt="/"
|
|
|
|
for opt in `echo ${opts} | sed -e 's_|_ _'g`; do
|
|
|
|
if [ "$1" != "${opt}" ]; then
|
|
|
|
todirnames="${todirnames} -e s|/${opt}/|/${1}/|g"
|
|
|
|
patt="${patt}${1}/"
|
|
|
|
if [ "${patt}" != "/${1}/" ]; then
|
|
|
|
todirnames="${todirnames} -e s|${patt}|/${1}/|g"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
1994-06-15 10:01:42 +02:00
|
|
|
shift
|
|
|
|
done
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
gcc.c (print_multi_os_directory): New variable.
* gcc.c (print_multi_os_directory): New variable.
(option_map): Support --print-multi-os-directory.
(struct prefix_list): Add os_multilib field.
(multilib_os_dir): New variable.
(static_specs): Add multilib_options.
(find_a_file): Add multilib argument. Search in GCC or OS multilib
subdirs if non-zero.
(read_specs, execute): Update callers.
(find_file): Likewise. Don't prefix name with multilib_dir, instead
pass 1 as multilib option.
(display_help): Include --print-multi-os-directory.
(add_prefix): Add os_multilib argument. Initialize pl->os_multilib.
(process_command): Update callers. Handle --print-multi-os-directory.
(do_spec_1) ['D']: Use multilib_os_directory if pl->os_multilib is
set.
(main): Update find_a_file and add_prefix callers.
Handle print_multi_os_directory.
(struct mdswitchstr): New.
(mdswitches, n_mdswitches): New variables.
(used_arg): Add MULTILIB_DEFAULT switches too if they are not
present on the command line nor their mutually incompatible
switches.
(default_arg): Optimize.
(set_multilib_dir): Compute multilib_os_dir. Initialize mdswitches
array.
(print_multilib_info): Only print GCC multilib dir name, not OS
multilib dirname.
* genmultilib: Add osdirnames parameter. Output multilib_options
variable. If osdirnames is specified, output dirnames as
dirname:osdirname.
* mklibgcc.in: Use MULTILIB_OSDIRNAMES, --print-multi-directory
and --print-multi-os-directory instead of SHLIB_SLIBDIR_SUFFIXES
to compute libgcc_s soname and install path.
* Makefile.in (libgcc.mk): Pass MULTILIB_OSDIRNAMES instead of
SHLIB_SLIBDIR_SUFFIXES to mklibgcc.
(s_mlib): Pass MULTILIB_OSDIRNAMES or nothing as last genmultilib
argument.
* config/sparc/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64,
ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_COMMON): Remove.
(STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between -m32
and -m64.
* config/sparc/t-sol2-64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/sol2-bi.h (STARTFILE_ARCH64_SPEC): Remove.
(STARTFILE_ARCH_SPEC): Remove.
* config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Remove.
* config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
From-SVN: r57786
2002-10-03 22:35:14 +02:00
|
|
|
# Construct a sed pattern which will convert option names to OS directory
|
|
|
|
# names.
|
|
|
|
toosdirnames=
|
2003-10-23 07:16:56 +02:00
|
|
|
defaultosdirname=
|
2013-03-14 09:52:13 +01:00
|
|
|
defaultosdirname2=
|
2012-11-14 22:29:15 +01:00
|
|
|
if [ -n "${multiarch}" ]; then
|
|
|
|
defaultosdirname=::${multiarch}
|
|
|
|
fi
|
gcc.c (print_multi_os_directory): New variable.
* gcc.c (print_multi_os_directory): New variable.
(option_map): Support --print-multi-os-directory.
(struct prefix_list): Add os_multilib field.
(multilib_os_dir): New variable.
(static_specs): Add multilib_options.
(find_a_file): Add multilib argument. Search in GCC or OS multilib
subdirs if non-zero.
(read_specs, execute): Update callers.
(find_file): Likewise. Don't prefix name with multilib_dir, instead
pass 1 as multilib option.
(display_help): Include --print-multi-os-directory.
(add_prefix): Add os_multilib argument. Initialize pl->os_multilib.
(process_command): Update callers. Handle --print-multi-os-directory.
(do_spec_1) ['D']: Use multilib_os_directory if pl->os_multilib is
set.
(main): Update find_a_file and add_prefix callers.
Handle print_multi_os_directory.
(struct mdswitchstr): New.
(mdswitches, n_mdswitches): New variables.
(used_arg): Add MULTILIB_DEFAULT switches too if they are not
present on the command line nor their mutually incompatible
switches.
(default_arg): Optimize.
(set_multilib_dir): Compute multilib_os_dir. Initialize mdswitches
array.
(print_multilib_info): Only print GCC multilib dir name, not OS
multilib dirname.
* genmultilib: Add osdirnames parameter. Output multilib_options
variable. If osdirnames is specified, output dirnames as
dirname:osdirname.
* mklibgcc.in: Use MULTILIB_OSDIRNAMES, --print-multi-directory
and --print-multi-os-directory instead of SHLIB_SLIBDIR_SUFFIXES
to compute libgcc_s soname and install path.
* Makefile.in (libgcc.mk): Pass MULTILIB_OSDIRNAMES instead of
SHLIB_SLIBDIR_SUFFIXES to mklibgcc.
(s_mlib): Pass MULTILIB_OSDIRNAMES or nothing as last genmultilib
argument.
* config/sparc/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64,
ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_COMMON): Remove.
(STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between -m32
and -m64.
* config/sparc/t-sol2-64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/sol2-bi.h (STARTFILE_ARCH64_SPEC): Remove.
(STARTFILE_ARCH_SPEC): Remove.
* config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Remove.
* config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
From-SVN: r57786
2002-10-03 22:35:14 +02:00
|
|
|
if [ -n "${osdirnames}" ]; then
|
|
|
|
set x ${osdirnames}
|
|
|
|
shift
|
2003-10-23 07:16:56 +02:00
|
|
|
while [ $# != 0 ] ; do
|
|
|
|
case "$1" in
|
|
|
|
.=*)
|
|
|
|
defaultosdirname=`echo $1 | sed 's|^.=|:|'`
|
2012-11-14 22:29:15 +01:00
|
|
|
if [ -n "${multiarch}" ]; then
|
|
|
|
defaultosdirname=${defaultosdirname}:${multiarch}
|
|
|
|
fi
|
2013-03-14 09:52:13 +01:00
|
|
|
case "$defaultosdirname" in
|
|
|
|
::*) ;;
|
|
|
|
*)
|
|
|
|
defaultosdirname2=${defaultosdirname}
|
|
|
|
defaultosdirname=
|
|
|
|
;;
|
|
|
|
esac
|
2003-10-23 07:16:56 +02:00
|
|
|
shift
|
|
|
|
;;
|
|
|
|
*=*)
|
|
|
|
patt=`echo $1 | sed -e 's|=|/$=/|'`
|
|
|
|
toosdirnames="${toosdirnames} -e s=^/${patt}/="
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
break
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ $# != 0 ]; then
|
|
|
|
for set in ${options}; do
|
|
|
|
for opts in `echo ${set} | sed -e 's|/| |'g`; do
|
|
|
|
patt="/"
|
|
|
|
for opt in `echo ${opts} | sed -e 's_|_ _'g`; do
|
|
|
|
if [ "$1" != "${opt}" ]; then
|
|
|
|
toosdirnames="${toosdirnames} -e s|/${opt}/|/${1}/|g"
|
|
|
|
patt="${patt}${1}/"
|
|
|
|
if [ "${patt}" != "/${1}/" ]; then
|
|
|
|
toosdirnames="${toosdirnames} -e s|${patt}|/${1}/|g"
|
|
|
|
fi
|
gcc.c (print_multi_os_directory): New variable.
* gcc.c (print_multi_os_directory): New variable.
(option_map): Support --print-multi-os-directory.
(struct prefix_list): Add os_multilib field.
(multilib_os_dir): New variable.
(static_specs): Add multilib_options.
(find_a_file): Add multilib argument. Search in GCC or OS multilib
subdirs if non-zero.
(read_specs, execute): Update callers.
(find_file): Likewise. Don't prefix name with multilib_dir, instead
pass 1 as multilib option.
(display_help): Include --print-multi-os-directory.
(add_prefix): Add os_multilib argument. Initialize pl->os_multilib.
(process_command): Update callers. Handle --print-multi-os-directory.
(do_spec_1) ['D']: Use multilib_os_directory if pl->os_multilib is
set.
(main): Update find_a_file and add_prefix callers.
Handle print_multi_os_directory.
(struct mdswitchstr): New.
(mdswitches, n_mdswitches): New variables.
(used_arg): Add MULTILIB_DEFAULT switches too if they are not
present on the command line nor their mutually incompatible
switches.
(default_arg): Optimize.
(set_multilib_dir): Compute multilib_os_dir. Initialize mdswitches
array.
(print_multilib_info): Only print GCC multilib dir name, not OS
multilib dirname.
* genmultilib: Add osdirnames parameter. Output multilib_options
variable. If osdirnames is specified, output dirnames as
dirname:osdirname.
* mklibgcc.in: Use MULTILIB_OSDIRNAMES, --print-multi-directory
and --print-multi-os-directory instead of SHLIB_SLIBDIR_SUFFIXES
to compute libgcc_s soname and install path.
* Makefile.in (libgcc.mk): Pass MULTILIB_OSDIRNAMES instead of
SHLIB_SLIBDIR_SUFFIXES to mklibgcc.
(s_mlib): Pass MULTILIB_OSDIRNAMES or nothing as last genmultilib
argument.
* config/sparc/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64,
ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_COMMON): Remove.
(STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between -m32
and -m64.
* config/sparc/t-sol2-64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/sol2-bi.h (STARTFILE_ARCH64_SPEC): Remove.
(STARTFILE_ARCH_SPEC): Remove.
* config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Remove.
* config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
From-SVN: r57786
2002-10-03 22:35:14 +02:00
|
|
|
fi
|
2003-10-23 07:16:56 +02:00
|
|
|
done
|
|
|
|
shift
|
gcc.c (print_multi_os_directory): New variable.
* gcc.c (print_multi_os_directory): New variable.
(option_map): Support --print-multi-os-directory.
(struct prefix_list): Add os_multilib field.
(multilib_os_dir): New variable.
(static_specs): Add multilib_options.
(find_a_file): Add multilib argument. Search in GCC or OS multilib
subdirs if non-zero.
(read_specs, execute): Update callers.
(find_file): Likewise. Don't prefix name with multilib_dir, instead
pass 1 as multilib option.
(display_help): Include --print-multi-os-directory.
(add_prefix): Add os_multilib argument. Initialize pl->os_multilib.
(process_command): Update callers. Handle --print-multi-os-directory.
(do_spec_1) ['D']: Use multilib_os_directory if pl->os_multilib is
set.
(main): Update find_a_file and add_prefix callers.
Handle print_multi_os_directory.
(struct mdswitchstr): New.
(mdswitches, n_mdswitches): New variables.
(used_arg): Add MULTILIB_DEFAULT switches too if they are not
present on the command line nor their mutually incompatible
switches.
(default_arg): Optimize.
(set_multilib_dir): Compute multilib_os_dir. Initialize mdswitches
array.
(print_multilib_info): Only print GCC multilib dir name, not OS
multilib dirname.
* genmultilib: Add osdirnames parameter. Output multilib_options
variable. If osdirnames is specified, output dirnames as
dirname:osdirname.
* mklibgcc.in: Use MULTILIB_OSDIRNAMES, --print-multi-directory
and --print-multi-os-directory instead of SHLIB_SLIBDIR_SUFFIXES
to compute libgcc_s soname and install path.
* Makefile.in (libgcc.mk): Pass MULTILIB_OSDIRNAMES instead of
SHLIB_SLIBDIR_SUFFIXES to mklibgcc.
(s_mlib): Pass MULTILIB_OSDIRNAMES or nothing as last genmultilib
argument.
* config/sparc/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64,
ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_COMMON): Remove.
(STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between -m32
and -m64.
* config/sparc/t-sol2-64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/sol2-bi.h (STARTFILE_ARCH64_SPEC): Remove.
(STARTFILE_ARCH_SPEC): Remove.
* config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Remove.
* config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
From-SVN: r57786
2002-10-03 22:35:14 +02:00
|
|
|
done
|
|
|
|
done
|
2003-10-23 07:16:56 +02:00
|
|
|
fi
|
gcc.c (print_multi_os_directory): New variable.
* gcc.c (print_multi_os_directory): New variable.
(option_map): Support --print-multi-os-directory.
(struct prefix_list): Add os_multilib field.
(multilib_os_dir): New variable.
(static_specs): Add multilib_options.
(find_a_file): Add multilib argument. Search in GCC or OS multilib
subdirs if non-zero.
(read_specs, execute): Update callers.
(find_file): Likewise. Don't prefix name with multilib_dir, instead
pass 1 as multilib option.
(display_help): Include --print-multi-os-directory.
(add_prefix): Add os_multilib argument. Initialize pl->os_multilib.
(process_command): Update callers. Handle --print-multi-os-directory.
(do_spec_1) ['D']: Use multilib_os_directory if pl->os_multilib is
set.
(main): Update find_a_file and add_prefix callers.
Handle print_multi_os_directory.
(struct mdswitchstr): New.
(mdswitches, n_mdswitches): New variables.
(used_arg): Add MULTILIB_DEFAULT switches too if they are not
present on the command line nor their mutually incompatible
switches.
(default_arg): Optimize.
(set_multilib_dir): Compute multilib_os_dir. Initialize mdswitches
array.
(print_multilib_info): Only print GCC multilib dir name, not OS
multilib dirname.
* genmultilib: Add osdirnames parameter. Output multilib_options
variable. If osdirnames is specified, output dirnames as
dirname:osdirname.
* mklibgcc.in: Use MULTILIB_OSDIRNAMES, --print-multi-directory
and --print-multi-os-directory instead of SHLIB_SLIBDIR_SUFFIXES
to compute libgcc_s soname and install path.
* Makefile.in (libgcc.mk): Pass MULTILIB_OSDIRNAMES instead of
SHLIB_SLIBDIR_SUFFIXES to mklibgcc.
(s_mlib): Pass MULTILIB_OSDIRNAMES or nothing as last genmultilib
argument.
* config/sparc/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64,
ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_COMMON): Remove.
(STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between -m32
and -m64.
* config/sparc/t-sol2-64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/sol2-bi.h (STARTFILE_ARCH64_SPEC): Remove.
(STARTFILE_ARCH_SPEC): Remove.
* config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Remove.
* config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
From-SVN: r57786
2002-10-03 22:35:14 +02:00
|
|
|
fi
|
|
|
|
|
1994-06-15 10:01:42 +02:00
|
|
|
# We need another recursive shell script to correctly handle positive
|
|
|
|
# matches. If we are invoked as
|
|
|
|
# genmultilib "opt1 opt2" "" "opt1=nopt1 opt2=nopt2"
|
|
|
|
# we must output
|
|
|
|
# opt1/opt2 opt1 opt2
|
|
|
|
# opt1/opt2 nopt1 opt2
|
|
|
|
# opt1/opt2 opt1 nopt2
|
|
|
|
# opt1/opt2 nopt1 nopt2
|
|
|
|
# In other words, we must output all combinations of matches.
|
|
|
|
rm -f tmpmultilib2
|
|
|
|
cat >tmpmultilib2 <<\EOF
|
|
|
|
#!/bin/sh
|
|
|
|
# The positional parameters are a list of matches to consider.
|
|
|
|
# ${dirout} is the directory name and ${optout} is the current list of
|
|
|
|
# options.
|
|
|
|
if [ "$#" = "0" ]; then
|
1996-06-08 04:45:34 +02:00
|
|
|
echo "\"${dirout} ${optout};\","
|
1994-06-15 10:01:42 +02:00
|
|
|
else
|
|
|
|
first=$1
|
|
|
|
shift
|
|
|
|
dirout="${dirout}" optout="${optout}" ./tmpmultilib2 $@
|
1995-05-10 20:26:30 +02:00
|
|
|
l=`echo ${first} | sed -e 's/=.*$//' -e 's/?/=/g'`
|
|
|
|
r=`echo ${first} | sed -e 's/^.*=//' -e 's/?/=/g'`
|
1995-06-23 01:06:34 +02:00
|
|
|
if expr " ${optout} " : ".* ${l} .*" > /dev/null; then
|
1994-06-15 10:01:42 +02:00
|
|
|
newopt=`echo " ${optout} " | sed -e "s/ ${l} / ${r} /" -e 's/^ //' -e 's/ $//'`
|
|
|
|
dirout="${dirout}" optout="${newopt}" ./tmpmultilib2 $@
|
1995-06-23 01:06:34 +02:00
|
|
|
fi
|
1994-06-15 10:01:42 +02:00
|
|
|
fi
|
|
|
|
EOF
|
|
|
|
chmod +x tmpmultilib2
|
|
|
|
|
|
|
|
# Start with the current directory, which includes only negations.
|
|
|
|
optout=
|
|
|
|
for set in ${options}; do
|
1999-12-09 11:41:45 +01:00
|
|
|
for opt in `echo ${set} | sed -e 's_[/|]_ _g'`; do
|
1994-06-15 10:01:42 +02:00
|
|
|
optout="${optout} !${opt}"
|
|
|
|
done
|
|
|
|
done
|
|
|
|
optout=`echo ${optout} | sed -e 's/^ //'`
|
2003-10-23 07:16:56 +02:00
|
|
|
echo "\".${defaultosdirname} ${optout};\","
|
2013-03-14 09:52:13 +01:00
|
|
|
[ -n "${defaultosdirname2}" ] && echo "\".${defaultosdirname2} ${optout};\","
|
1994-06-15 10:01:42 +02:00
|
|
|
|
2013-01-13 11:12:07 +01:00
|
|
|
# This part of code convert an option combination to
|
|
|
|
# its corresponding directory names.
|
|
|
|
# The directory names will be deduced from MULTILIB_DIRNAMES,
|
|
|
|
# MULTILIB_OSDIRNAMES or the option combination itself.
|
|
|
|
rm -rf tmpmultilib3
|
|
|
|
cat >tmpmultilib3 <<\EOF
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
dirout=
|
|
|
|
combo=$1
|
|
|
|
todirnames=$2
|
|
|
|
toosdirnames=$3
|
|
|
|
enable_multilib=$4
|
|
|
|
|
|
|
|
if [ -n "${todirnames}" ]; then
|
|
|
|
dirout=`echo ${combo} | sed ${todirnames}`
|
|
|
|
else
|
|
|
|
dirout=`echo ${combo} | sed -e 's/=/-/g'`
|
|
|
|
fi
|
|
|
|
# Remove the leading and trailing slashes.
|
|
|
|
dirout=`echo ${dirout} | sed -e 's|^/||' -e 's|/*:/*|:|' -e 's|/$||g'`
|
|
|
|
|
|
|
|
# Use the OS directory names rather than the option names.
|
|
|
|
if [ -n "${toosdirnames}" ]; then
|
|
|
|
osdirout=`echo ${combo} | sed ${toosdirnames}`
|
|
|
|
# Remove the leading and trailing slashes.
|
|
|
|
osdirout=`echo ${osdirout} | sed -e 's|^/||' -e 's|/*:/*|:|' -e 's|/$||g'`
|
|
|
|
if [ "x${enable_multilib}" != xyes ]; then
|
|
|
|
dirout=".:${osdirout}"
|
|
|
|
disable_multilib=yes
|
|
|
|
else
|
|
|
|
case "${osdirout}" in
|
|
|
|
!*)
|
|
|
|
dirout=`echo ${osdirout} | sed 's/^!//'`
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
dirout="${dirout}:${osdirout}"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if [ "x${enable_multilib}" != xyes ]; then
|
|
|
|
# genmultilib with --disable-multilib should be
|
|
|
|
# called with '' '' '' '' '' '' '' no
|
|
|
|
# if MULTILIB_OSDIRNAMES is empty.
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
echo "${dirout}"
|
|
|
|
EOF
|
|
|
|
chmod +x tmpmultilib3
|
|
|
|
|
|
|
|
# Script to look through the options and output each option that is present,
|
|
|
|
# and negate each option that is not present.
|
|
|
|
rm -rf tmpmultilib4
|
|
|
|
cat > tmpmultilib4 <<\EOF
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
optout=
|
|
|
|
combo=$1
|
|
|
|
options=$2
|
|
|
|
|
|
|
|
for set in ${options}; do
|
|
|
|
setopts=`echo ${set} | sed -e 's_[/|]_ _g'`
|
|
|
|
for opt in ${setopts}; do
|
|
|
|
if expr "${combo} " : ".*/${opt}/.*" > /dev/null; then
|
|
|
|
optout="${optout} ${opt}"
|
|
|
|
else
|
|
|
|
optout="${optout} !${opt}"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
optout=`echo ${optout} | sed -e 's/^ //'`
|
|
|
|
echo "${optout}"
|
|
|
|
EOF
|
|
|
|
chmod +x tmpmultilib4
|
|
|
|
|
1994-06-15 10:01:42 +02:00
|
|
|
# Work over the list of combinations. We have to translate each one
|
|
|
|
# to use the directory names rather than the option names, we have to
|
|
|
|
# include the information in matches, and we have to generate the
|
|
|
|
# correct list of options and negations.
|
|
|
|
for combo in ${combinations}; do
|
|
|
|
# Use the directory names rather than the option names.
|
2013-01-13 11:12:07 +01:00
|
|
|
dirout=`./tmpmultilib3 "${combo}" "${todirnames}" "${toosdirnames}" "${enable_multilib}"`
|
gcc.c (print_multi_os_directory): New variable.
* gcc.c (print_multi_os_directory): New variable.
(option_map): Support --print-multi-os-directory.
(struct prefix_list): Add os_multilib field.
(multilib_os_dir): New variable.
(static_specs): Add multilib_options.
(find_a_file): Add multilib argument. Search in GCC or OS multilib
subdirs if non-zero.
(read_specs, execute): Update callers.
(find_file): Likewise. Don't prefix name with multilib_dir, instead
pass 1 as multilib option.
(display_help): Include --print-multi-os-directory.
(add_prefix): Add os_multilib argument. Initialize pl->os_multilib.
(process_command): Update callers. Handle --print-multi-os-directory.
(do_spec_1) ['D']: Use multilib_os_directory if pl->os_multilib is
set.
(main): Update find_a_file and add_prefix callers.
Handle print_multi_os_directory.
(struct mdswitchstr): New.
(mdswitches, n_mdswitches): New variables.
(used_arg): Add MULTILIB_DEFAULT switches too if they are not
present on the command line nor their mutually incompatible
switches.
(default_arg): Optimize.
(set_multilib_dir): Compute multilib_os_dir. Initialize mdswitches
array.
(print_multilib_info): Only print GCC multilib dir name, not OS
multilib dirname.
* genmultilib: Add osdirnames parameter. Output multilib_options
variable. If osdirnames is specified, output dirnames as
dirname:osdirname.
* mklibgcc.in: Use MULTILIB_OSDIRNAMES, --print-multi-directory
and --print-multi-os-directory instead of SHLIB_SLIBDIR_SUFFIXES
to compute libgcc_s soname and install path.
* Makefile.in (libgcc.mk): Pass MULTILIB_OSDIRNAMES instead of
SHLIB_SLIBDIR_SUFFIXES to mklibgcc.
(s_mlib): Pass MULTILIB_OSDIRNAMES or nothing as last genmultilib
argument.
* config/sparc/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64,
ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_COMMON): Remove.
(STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between -m32
and -m64.
* config/sparc/t-sol2-64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/sol2-bi.h (STARTFILE_ARCH64_SPEC): Remove.
(STARTFILE_ARCH_SPEC): Remove.
* config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Remove.
* config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
From-SVN: r57786
2002-10-03 22:35:14 +02:00
|
|
|
|
1994-06-15 10:01:42 +02:00
|
|
|
# Look through the options. We must output each option that is
|
1995-10-20 23:57:04 +01:00
|
|
|
# present, and negate each option that is not present.
|
2013-01-13 11:12:07 +01:00
|
|
|
optout=`./tmpmultilib4 "${combo}" "${options}"`
|
1994-06-15 10:01:42 +02:00
|
|
|
|
|
|
|
# Output the line with all appropriate matches.
|
1996-08-12 18:36:42 +02:00
|
|
|
dirout="${dirout}" optout="${optout}" ./tmpmultilib2
|
1994-06-15 10:01:42 +02:00
|
|
|
done
|
|
|
|
|
1996-06-08 04:45:34 +02:00
|
|
|
# Terminate the list of string.
|
|
|
|
echo "NULL"
|
1996-08-12 18:36:42 +02:00
|
|
|
echo "};"
|
|
|
|
|
2013-01-13 11:12:07 +01:00
|
|
|
# Output rules used for multilib reuse.
|
|
|
|
echo ""
|
|
|
|
echo "static const char *const multilib_reuse_raw[] = {"
|
|
|
|
for rrule in ${multilib_reuse}; do
|
|
|
|
# The left part of the rule are the options we used to build multilib.
|
|
|
|
# The right part of the rule are the options that can reuse this multilib.
|
|
|
|
combo=`echo ${rrule} | sed -e 's/=.*$//' -e 's/\./=/g'`
|
|
|
|
copts=`echo ${rrule} | sed -e 's/^.*=//' -e 's/\./=/g'`
|
|
|
|
# The variable ${combinations} are the option combinations we will build
|
|
|
|
# multilib from. If the combination in the left part of reuse rule isn't
|
|
|
|
# in this variable, it means no multilib will be built for current reuse
|
|
|
|
# rule. Thus the reuse purpose specified by current rule is meaningless.
|
|
|
|
if expr "${combinations} " : ".*/${combo}/.*" > /dev/null; then
|
|
|
|
combo="/${combo}/"
|
|
|
|
dirout=`./tmpmultilib3 "${combo}" "${todirnames}" "${toosdirnames}" "${enable_multilib}"`
|
|
|
|
copts="/${copts}/"
|
|
|
|
optout=`./tmpmultilib4 "${copts}" "${options}"`
|
|
|
|
# Output the line with all appropriate matches.
|
|
|
|
dirout="${dirout}" optout="${optout}" ./tmpmultilib2
|
|
|
|
else
|
|
|
|
echo "The rule ${rrule} is trying to reuse nonexistent multilib."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Terminate the list of string.
|
|
|
|
echo "NULL"
|
|
|
|
echo "};"
|
|
|
|
|
1996-08-12 18:36:42 +02:00
|
|
|
# Output all of the matches now as option and that is the same as that, with
|
1998-04-03 18:37:26 +02:00
|
|
|
# a semicolon trailer. Include all of the normal options as well.
|
1996-08-12 18:36:42 +02:00
|
|
|
# Note, the format of the matches is reversed compared
|
|
|
|
# to what we want, so switch them around.
|
|
|
|
echo ""
|
top level:
* Makefile.in (WARN_CFLAGS): Add -Wwrite-strings.
(tree.o): Depend on output.h.
* c-decl.c (pending_invalid_xref_file,
current_function_prototype_file): Constify.
(pushdecl): Constify a local char *.
(define_label): Constify filename parameter.
* c-lex.c (init_parse): Constify parameter and return value.
* c-typeck.c (c_expand_asm_operands): Constify filename parameter.
* c-tree.h: Update prototypes.
* c-parse.in: Constify filename member of %union, and if_stmt_file.
* c-parse.y, c-parse.c, c-parse.h, objc/objc-parse.y,
objc/objc-parse.c: Regenerate.
* dwarfout.c (dwarfout_init): Constify main_input_filename parameter.
* dwarfout.h: Update prototypes.
* expr.c (expand_expr): Constify a local char *.
* flags.h: Constify main_input_filename.
* function.c (expand_function_end): Constify filename parameter.
* genrecog.c (make_insn_sequence): Use a character array for
c_test_pos.
(main): Remove unused variables.
* input.h: Constify input_filename, main_input_filename, and
file_stack.name. Update prototypes.
* output.h: Declare first_global_object_name and
weak_global_object_name here, as const char *.
* stmt.c (expand_asm_operands): Constify filename parameter.
* toplev.c (compile_file, push_srcloc, debug_start_source_file):
Constify filename parameter.
(input_filename, main_input_filename): Constify.
* toplev.h: Update prototypes.
* tree.c: Include output.h. Don't declare
first_global_object_name or weak_global_object_name. Clean up string
bashing in get_file_function_name_long.
* tree.h (struct tree_decl): Constify filename member.
(input_filename): Constify.
Update prototypes.
* varasm.c (first_global_object_name, weak_global_object_name):
Constify.
(assemble_start_function, assemble_variable): Clean up string bashing.
* gcc.c: Constify all spec-related strings initialized,
transitively, from string constants. Constify all strings
and string variables related to multilibs.
(set_spec, read_specs): Cast argument to free to PTR.
(used_arg): Do not modify multilib_matches. Use strncmp plus
length comparison to compare multilib switches.
* genmultilib: Constify everything declared in multilib.h.
ch:
* ch-tree.h: Update prototypes. Remove prototypes for
functions declared elsewhere.
* decl.c (define_label): Constify filename parameter.
* grant.c (globalize_decl, set_default_grant_file): Constify
local char * variables. Don't declare
first_global_object_name or asm_out_file.
* lang.c (chill_real_input_filename): Constify.
* lex.c (init_parse): Constify parameter and return value.
* parse.c: Don't declare input_filename.
(ch_expand_asm_operands): Constify filename parameter.
(parse_multi_dimension_case_action): Constify local char *.
* satisfy.c (safe_satisfy_decl): Constify local char *.
cp:
* cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
and pending_inline.filename. Update prototypes.
* decl.c (define_label): Constify filename parameter.
* decl2.c (warn_if_unknown_interface): Constify local char *.
* input.c Constify input_source.filename. Don't declare
input_filename or lineno. Constify filename parameter to feed_input.
* lex.c (init_parse): Constify parameter and return value.
(cp_pragma_interface, cp_pragma_implementation): Constify
filename argument.
(reinit_parse_for_method, reinit_parse_for_block,
reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
Constify local char *.
* pt.c: Don't declare lineno or input_filename.
(print_template_context, tsubst_friend_function, tsubst_decl,
tsubst, instantiate_decl): Constify local char *.
* semantics.c (expand_body): Constify local char *.
* tree.c (build_srcloc): Constify filename parameter.
* typeck.c (c_expand_asm_operands): Constify filename
parameter.
f:
* com.c (ffecom_subscript_check_): Constify array_name
parameter. Clean up string bashing.
(ffecom_arrayref_, ffecom_char_args_x_): Constify array_name
parameter.
(ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_,
ffecom_sym_transform_, ffecom_sym_transform_assign_): Constify
local char *.
(init_parse): Constify parameter and return value.
* lex.c: Include dwarfout.h instead of prototyping dwarfout_*
functions here.
(ffelex_file_pop_, ffelex_file_push_): Constify filename parameter.
(ffelex_hash_, ffelex_include_): Constify local char *.
* std.c (ffestd_exec_end): Constify local char *.
* where.c (ffewhere_file_new): Constify filename parameter.
* where.h: Update prototypes.
java:
* check_init.c (check_init): Constify local char *.
* class.c (push_class): Constify local char *.
* java_tree.h: Update prototypes.
* jcf-io.c (open_class): Constify filename parameter and
return value.
(find_class): Remove redundant string copy. Cast return from
open_class.
* jcf-parse.c (read_class, parse_class_file, yyparse):
Constify local char *.
* jcf-write.c (generate_bytecode_insns, generate_classfile):
Constify local char *.
* jcf.h (JCF): Constify filename and classname.
(JCF_FINISH): Cast args to FREE to char * when appropriate.
* lang.c (init_parse): Constify parameter and return value.
* lex.c (java_get_line_col): Constify filename parameter.
* parse.h: Constify parser_ctxt.filename. Update prototypes.
* parse.y (java_parser_context_suspend,
issue_warning_error_from_context, safe_layout_class): Constify
local char *.
* parse.c: Regenerate.
From-SVN: r33804
2000-05-09 21:56:01 +02:00
|
|
|
echo "static const char *const multilib_matches_raw[] = {"
|
1996-08-12 18:36:42 +02:00
|
|
|
for match in ${matches}; do
|
|
|
|
l=`echo ${match} | sed -e 's/=.*$//' -e 's/?/=/g'`
|
|
|
|
r=`echo ${match} | sed -e 's/^.*=//' -e 's/?/=/g'`
|
|
|
|
echo "\"${r} ${l};\","
|
|
|
|
done
|
|
|
|
for set in ${options}; do
|
1999-12-09 11:41:45 +01:00
|
|
|
for opt in `echo ${set} | sed -e 's_[/|]_ _'g`; do
|
1996-08-12 18:36:42 +02:00
|
|
|
echo "\"${opt} ${opt};\","
|
|
|
|
done
|
|
|
|
done
|
|
|
|
echo "NULL"
|
|
|
|
echo "};"
|
1994-06-15 10:01:42 +02:00
|
|
|
|
1996-08-12 18:36:42 +02:00
|
|
|
# Output the default options now
|
|
|
|
echo ""
|
top level:
* Makefile.in (WARN_CFLAGS): Add -Wwrite-strings.
(tree.o): Depend on output.h.
* c-decl.c (pending_invalid_xref_file,
current_function_prototype_file): Constify.
(pushdecl): Constify a local char *.
(define_label): Constify filename parameter.
* c-lex.c (init_parse): Constify parameter and return value.
* c-typeck.c (c_expand_asm_operands): Constify filename parameter.
* c-tree.h: Update prototypes.
* c-parse.in: Constify filename member of %union, and if_stmt_file.
* c-parse.y, c-parse.c, c-parse.h, objc/objc-parse.y,
objc/objc-parse.c: Regenerate.
* dwarfout.c (dwarfout_init): Constify main_input_filename parameter.
* dwarfout.h: Update prototypes.
* expr.c (expand_expr): Constify a local char *.
* flags.h: Constify main_input_filename.
* function.c (expand_function_end): Constify filename parameter.
* genrecog.c (make_insn_sequence): Use a character array for
c_test_pos.
(main): Remove unused variables.
* input.h: Constify input_filename, main_input_filename, and
file_stack.name. Update prototypes.
* output.h: Declare first_global_object_name and
weak_global_object_name here, as const char *.
* stmt.c (expand_asm_operands): Constify filename parameter.
* toplev.c (compile_file, push_srcloc, debug_start_source_file):
Constify filename parameter.
(input_filename, main_input_filename): Constify.
* toplev.h: Update prototypes.
* tree.c: Include output.h. Don't declare
first_global_object_name or weak_global_object_name. Clean up string
bashing in get_file_function_name_long.
* tree.h (struct tree_decl): Constify filename member.
(input_filename): Constify.
Update prototypes.
* varasm.c (first_global_object_name, weak_global_object_name):
Constify.
(assemble_start_function, assemble_variable): Clean up string bashing.
* gcc.c: Constify all spec-related strings initialized,
transitively, from string constants. Constify all strings
and string variables related to multilibs.
(set_spec, read_specs): Cast argument to free to PTR.
(used_arg): Do not modify multilib_matches. Use strncmp plus
length comparison to compare multilib switches.
* genmultilib: Constify everything declared in multilib.h.
ch:
* ch-tree.h: Update prototypes. Remove prototypes for
functions declared elsewhere.
* decl.c (define_label): Constify filename parameter.
* grant.c (globalize_decl, set_default_grant_file): Constify
local char * variables. Don't declare
first_global_object_name or asm_out_file.
* lang.c (chill_real_input_filename): Constify.
* lex.c (init_parse): Constify parameter and return value.
* parse.c: Don't declare input_filename.
(ch_expand_asm_operands): Constify filename parameter.
(parse_multi_dimension_case_action): Constify local char *.
* satisfy.c (safe_satisfy_decl): Constify local char *.
cp:
* cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
and pending_inline.filename. Update prototypes.
* decl.c (define_label): Constify filename parameter.
* decl2.c (warn_if_unknown_interface): Constify local char *.
* input.c Constify input_source.filename. Don't declare
input_filename or lineno. Constify filename parameter to feed_input.
* lex.c (init_parse): Constify parameter and return value.
(cp_pragma_interface, cp_pragma_implementation): Constify
filename argument.
(reinit_parse_for_method, reinit_parse_for_block,
reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
Constify local char *.
* pt.c: Don't declare lineno or input_filename.
(print_template_context, tsubst_friend_function, tsubst_decl,
tsubst, instantiate_decl): Constify local char *.
* semantics.c (expand_body): Constify local char *.
* tree.c (build_srcloc): Constify filename parameter.
* typeck.c (c_expand_asm_operands): Constify filename
parameter.
f:
* com.c (ffecom_subscript_check_): Constify array_name
parameter. Clean up string bashing.
(ffecom_arrayref_, ffecom_char_args_x_): Constify array_name
parameter.
(ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_,
ffecom_sym_transform_, ffecom_sym_transform_assign_): Constify
local char *.
(init_parse): Constify parameter and return value.
* lex.c: Include dwarfout.h instead of prototyping dwarfout_*
functions here.
(ffelex_file_pop_, ffelex_file_push_): Constify filename parameter.
(ffelex_hash_, ffelex_include_): Constify local char *.
* std.c (ffestd_exec_end): Constify local char *.
* where.c (ffewhere_file_new): Constify filename parameter.
* where.h: Update prototypes.
java:
* check_init.c (check_init): Constify local char *.
* class.c (push_class): Constify local char *.
* java_tree.h: Update prototypes.
* jcf-io.c (open_class): Constify filename parameter and
return value.
(find_class): Remove redundant string copy. Cast return from
open_class.
* jcf-parse.c (read_class, parse_class_file, yyparse):
Constify local char *.
* jcf-write.c (generate_bytecode_insns, generate_classfile):
Constify local char *.
* jcf.h (JCF): Constify filename and classname.
(JCF_FINISH): Cast args to FREE to char * when appropriate.
* lang.c (init_parse): Constify parameter and return value.
* lex.c (java_get_line_col): Constify filename parameter.
* parse.h: Constify parser_ctxt.filename. Update prototypes.
* parse.y (java_parser_context_suspend,
issue_warning_error_from_context, safe_layout_class): Constify
local char *.
* parse.c: Regenerate.
From-SVN: r33804
2000-05-09 21:56:01 +02:00
|
|
|
echo "static const char *multilib_extra = \"${extra}\";"
|
2000-03-06 19:05:52 +01:00
|
|
|
|
|
|
|
# Output the exclusion rules now
|
|
|
|
echo ""
|
top level:
* Makefile.in (WARN_CFLAGS): Add -Wwrite-strings.
(tree.o): Depend on output.h.
* c-decl.c (pending_invalid_xref_file,
current_function_prototype_file): Constify.
(pushdecl): Constify a local char *.
(define_label): Constify filename parameter.
* c-lex.c (init_parse): Constify parameter and return value.
* c-typeck.c (c_expand_asm_operands): Constify filename parameter.
* c-tree.h: Update prototypes.
* c-parse.in: Constify filename member of %union, and if_stmt_file.
* c-parse.y, c-parse.c, c-parse.h, objc/objc-parse.y,
objc/objc-parse.c: Regenerate.
* dwarfout.c (dwarfout_init): Constify main_input_filename parameter.
* dwarfout.h: Update prototypes.
* expr.c (expand_expr): Constify a local char *.
* flags.h: Constify main_input_filename.
* function.c (expand_function_end): Constify filename parameter.
* genrecog.c (make_insn_sequence): Use a character array for
c_test_pos.
(main): Remove unused variables.
* input.h: Constify input_filename, main_input_filename, and
file_stack.name. Update prototypes.
* output.h: Declare first_global_object_name and
weak_global_object_name here, as const char *.
* stmt.c (expand_asm_operands): Constify filename parameter.
* toplev.c (compile_file, push_srcloc, debug_start_source_file):
Constify filename parameter.
(input_filename, main_input_filename): Constify.
* toplev.h: Update prototypes.
* tree.c: Include output.h. Don't declare
first_global_object_name or weak_global_object_name. Clean up string
bashing in get_file_function_name_long.
* tree.h (struct tree_decl): Constify filename member.
(input_filename): Constify.
Update prototypes.
* varasm.c (first_global_object_name, weak_global_object_name):
Constify.
(assemble_start_function, assemble_variable): Clean up string bashing.
* gcc.c: Constify all spec-related strings initialized,
transitively, from string constants. Constify all strings
and string variables related to multilibs.
(set_spec, read_specs): Cast argument to free to PTR.
(used_arg): Do not modify multilib_matches. Use strncmp plus
length comparison to compare multilib switches.
* genmultilib: Constify everything declared in multilib.h.
ch:
* ch-tree.h: Update prototypes. Remove prototypes for
functions declared elsewhere.
* decl.c (define_label): Constify filename parameter.
* grant.c (globalize_decl, set_default_grant_file): Constify
local char * variables. Don't declare
first_global_object_name or asm_out_file.
* lang.c (chill_real_input_filename): Constify.
* lex.c (init_parse): Constify parameter and return value.
* parse.c: Don't declare input_filename.
(ch_expand_asm_operands): Constify filename parameter.
(parse_multi_dimension_case_action): Constify local char *.
* satisfy.c (safe_satisfy_decl): Constify local char *.
cp:
* cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
and pending_inline.filename. Update prototypes.
* decl.c (define_label): Constify filename parameter.
* decl2.c (warn_if_unknown_interface): Constify local char *.
* input.c Constify input_source.filename. Don't declare
input_filename or lineno. Constify filename parameter to feed_input.
* lex.c (init_parse): Constify parameter and return value.
(cp_pragma_interface, cp_pragma_implementation): Constify
filename argument.
(reinit_parse_for_method, reinit_parse_for_block,
reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
Constify local char *.
* pt.c: Don't declare lineno or input_filename.
(print_template_context, tsubst_friend_function, tsubst_decl,
tsubst, instantiate_decl): Constify local char *.
* semantics.c (expand_body): Constify local char *.
* tree.c (build_srcloc): Constify filename parameter.
* typeck.c (c_expand_asm_operands): Constify filename
parameter.
f:
* com.c (ffecom_subscript_check_): Constify array_name
parameter. Clean up string bashing.
(ffecom_arrayref_, ffecom_char_args_x_): Constify array_name
parameter.
(ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_,
ffecom_sym_transform_, ffecom_sym_transform_assign_): Constify
local char *.
(init_parse): Constify parameter and return value.
* lex.c: Include dwarfout.h instead of prototyping dwarfout_*
functions here.
(ffelex_file_pop_, ffelex_file_push_): Constify filename parameter.
(ffelex_hash_, ffelex_include_): Constify local char *.
* std.c (ffestd_exec_end): Constify local char *.
* where.c (ffewhere_file_new): Constify filename parameter.
* where.h: Update prototypes.
java:
* check_init.c (check_init): Constify local char *.
* class.c (push_class): Constify local char *.
* java_tree.h: Update prototypes.
* jcf-io.c (open_class): Constify filename parameter and
return value.
(find_class): Remove redundant string copy. Cast return from
open_class.
* jcf-parse.c (read_class, parse_class_file, yyparse):
Constify local char *.
* jcf-write.c (generate_bytecode_insns, generate_classfile):
Constify local char *.
* jcf.h (JCF): Constify filename and classname.
(JCF_FINISH): Cast args to FREE to char * when appropriate.
* lang.c (init_parse): Constify parameter and return value.
* lex.c (java_get_line_col): Constify filename parameter.
* parse.h: Constify parser_ctxt.filename. Update prototypes.
* parse.y (java_parser_context_suspend,
issue_warning_error_from_context, safe_layout_class): Constify
local char *.
* parse.c: Regenerate.
From-SVN: r33804
2000-05-09 21:56:01 +02:00
|
|
|
echo "static const char *const multilib_exclusions_raw[] = {"
|
2000-03-06 19:05:52 +01:00
|
|
|
for rule in ${exclusions}; do
|
|
|
|
s=`echo ${rule} | sed -e 's,/, ,g'`
|
|
|
|
echo "\"${s};\","
|
|
|
|
done
|
|
|
|
echo "NULL"
|
|
|
|
echo "};"
|
|
|
|
|
gcc.c (print_multi_os_directory): New variable.
* gcc.c (print_multi_os_directory): New variable.
(option_map): Support --print-multi-os-directory.
(struct prefix_list): Add os_multilib field.
(multilib_os_dir): New variable.
(static_specs): Add multilib_options.
(find_a_file): Add multilib argument. Search in GCC or OS multilib
subdirs if non-zero.
(read_specs, execute): Update callers.
(find_file): Likewise. Don't prefix name with multilib_dir, instead
pass 1 as multilib option.
(display_help): Include --print-multi-os-directory.
(add_prefix): Add os_multilib argument. Initialize pl->os_multilib.
(process_command): Update callers. Handle --print-multi-os-directory.
(do_spec_1) ['D']: Use multilib_os_directory if pl->os_multilib is
set.
(main): Update find_a_file and add_prefix callers.
Handle print_multi_os_directory.
(struct mdswitchstr): New.
(mdswitches, n_mdswitches): New variables.
(used_arg): Add MULTILIB_DEFAULT switches too if they are not
present on the command line nor their mutually incompatible
switches.
(default_arg): Optimize.
(set_multilib_dir): Compute multilib_os_dir. Initialize mdswitches
array.
(print_multilib_info): Only print GCC multilib dir name, not OS
multilib dirname.
* genmultilib: Add osdirnames parameter. Output multilib_options
variable. If osdirnames is specified, output dirnames as
dirname:osdirname.
* mklibgcc.in: Use MULTILIB_OSDIRNAMES, --print-multi-directory
and --print-multi-os-directory instead of SHLIB_SLIBDIR_SUFFIXES
to compute libgcc_s soname and install path.
* Makefile.in (libgcc.mk): Pass MULTILIB_OSDIRNAMES instead of
SHLIB_SLIBDIR_SUFFIXES to mklibgcc.
(s_mlib): Pass MULTILIB_OSDIRNAMES or nothing as last genmultilib
argument.
* config/sparc/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64,
ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_COMMON): Remove.
(STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between -m32
and -m64.
* config/sparc/t-sol2-64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/sparc/sol2-bi.h (STARTFILE_ARCH64_SPEC): Remove.
(STARTFILE_ARCH_SPEC): Remove.
* config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
* config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Remove.
* config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Set.
(SHLIB_SLIBDIR_SUFFIXES): Remove.
From-SVN: r57786
2002-10-03 22:35:14 +02:00
|
|
|
# Output the options now
|
|
|
|
moptions=`echo ${options} | sed -e 's,[ ][ ]*, ,g'`
|
|
|
|
echo ""
|
|
|
|
echo "static const char *multilib_options = \"${moptions}\";"
|
|
|
|
|
2003-12-20 08:40:24 +01:00
|
|
|
# Finally output the disable flag if specified
|
|
|
|
if [ "x${disable_multilib}" = xyes ]; then
|
|
|
|
echo ""
|
|
|
|
echo "#define DISABLE_MULTILIB 1"
|
|
|
|
fi
|
|
|
|
|
2002-12-17 06:23:07 +01:00
|
|
|
cd ..
|
|
|
|
rm -r tmpmultilib.$$
|
1994-06-15 10:01:42 +02:00
|
|
|
|
|
|
|
exit 0
|