comparison libtool-ldflags @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents a06113de4d67
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 #! /bin/sh 1 #! /bin/sh
2 2
3 # Script to translate LDFLAGS into a form suitable for use with libtool. 3 # Script to translate LDFLAGS into a form suitable for use with libtool.
4 4
5 # Copyright (C) 2005 Free Software Foundation, Inc. 5 # Copyright (C) 2005-2014 Free Software Foundation, Inc.
6 # 6 #
7 # This file is free software; you can redistribute it and/or modify 7 # This file is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by 8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or 9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version. 10 # (at your option) any later version.
34 prev_arg= 34 prev_arg=
35 35
36 for arg 36 for arg
37 do 37 do
38 case $arg in 38 case $arg in
39 -f*|--*) 39 -f*|--*|-static-lib*|-shared-lib*|-B*)
40 # Libtool does not ascribe any special meaning options 40 # Libtool does not ascribe any special meaning options
41 # that begin with -f or with a double-dash. So, it will 41 # that begin with -f or with a double-dash. So, it will
42 # think these options are linker options, and prefix them 42 # think these options are linker options, and prefix them
43 # with "-Wl,". Then, the compiler driver will ignore the 43 # with "-Wl,". Then, the compiler driver will ignore the
44 # options. So, we prefix these options with -Xcompiler to 44 # options. So, we prefix these options with -Xcompiler to
45 # make clear to libtool that they are in fact compiler 45 # make clear to libtool that they are in fact compiler
46 # options. 46 # options. Similarly for e.g. -static-libstdc++, or
47 # -B/some/path.
47 case $prev_arg in 48 case $prev_arg in
48 -Xpreprocessor|-Xcompiler|-Xlinker) 49 -Xpreprocessor|-Xcompiler|-Xlinker)
49 # This option is already prefixed; don't prefix it again. 50 # This option is already prefixed; don't prefix it again.
50 ;; 51 ;;
51 *) 52 *)