| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | $NetBSD: patch-configure,v 1.20 2016/12/30 11:15:00 jaapb Exp $ | | 1 | $NetBSD: patch-configure,v 1.21 2017/03/23 18:22:34 jperkin Exp $ |
2 | | | 2 | |
3 | All kinds of OS-specific changes to configure | | 3 | All kinds of OS-specific changes to configure |
4 | --- configure.orig 2016-11-04 16:08:24.000000000 +0000 | | 4 | --- configure.orig 2016-11-04 16:08:24.000000000 +0000 |
5 | +++ configure | | 5 | +++ configure |
6 | @@ -726,7 +726,10 @@ if test $with_sharedlibs = "yes"; then | | 6 | @@ -726,7 +726,10 @@ if test $with_sharedlibs = "yes"; then |
7 | *gcc*) | | 7 | *gcc*) |
8 | sharedcccompopts="-fPIC" | | 8 | sharedcccompopts="-fPIC" |
9 | if sh ./solaris-ld; then | | 9 | if sh ./solaris-ld; then |
10 | - mksharedlib="ld -G" | | 10 | - mksharedlib="ld -G" |
11 | + case "$target" in | | 11 | + case "$target" in |
12 | + x86_64*) mksharedlib="$bytecc -shared" ;; | | 12 | + x86_64*) mksharedlib="$bytecc -shared" ;; |
13 | + *) mksharedlib="$bytecc -G" ;; | | 13 | + *) mksharedlib="$bytecc -G" ;; |
14 | + esac | | 14 | + esac |
| @@ -53,79 +53,87 @@ All kinds of OS-specific changes to conf | | | @@ -53,79 +53,87 @@ All kinds of OS-specific changes to conf |
53 | i[3456]86-*-*bsd*) arch=i386; system=bsd_`sh ./runtest elf.c`;; | | 53 | i[3456]86-*-*bsd*) arch=i386; system=bsd_`sh ./runtest elf.c`;; |
54 | + i[3456]86-*-dragonfly*) arch=i386; system=bsd_`sh ./runtest elf.c`;; | | 54 | + i[3456]86-*-dragonfly*) arch=i386; system=bsd_`sh ./runtest elf.c`;; |
55 | i[3456]86-*-nextstep*) arch=i386; system=nextstep;; | | 55 | i[3456]86-*-nextstep*) arch=i386; system=nextstep;; |
56 | i[3456]86-*-solaris*) if $arch64; then | | 56 | i[3456]86-*-solaris*) if $arch64; then |
57 | arch=amd64; system=solaris | | 57 | arch=amd64; system=solaris |
58 | @@ -851,6 +854,7 @@ case "$target" in | | 58 | @@ -851,6 +854,7 @@ case "$target" in |
59 | i[3456]86-*-haiku*) arch=i386; system=beos;; | | 59 | i[3456]86-*-haiku*) arch=i386; system=beos;; |
60 | i[3456]86-*-beos*) arch=i386; system=beos;; | | 60 | i[3456]86-*-beos*) arch=i386; system=beos;; |
61 | i[3456]86-*-cygwin*) arch=i386; system=cygwin;; | | 61 | i[3456]86-*-cygwin*) arch=i386; system=cygwin;; |
62 | + i[3456]86-*-interix3*) arch=i386; system=interix3;; | | 62 | + i[3456]86-*-interix3*) arch=i386; system=interix3;; |
63 | i[3456]86-*-darwin*) if $arch64; then | | 63 | i[3456]86-*-darwin*) if $arch64; then |
64 | arch=amd64; system=macosx | | 64 | arch=amd64; system=macosx |
65 | else | | 65 | else |
66 | @@ -923,7 +927,6 @@ case "$arch,$nativecc,$system,$model" in | | 66 | @@ -888,6 +892,7 @@ case "$target" in |
| | | 67 | x86_64-*-mingw*) arch=amd64; system=mingw;; |
| | | 68 | aarch64-*-linux*) arch=arm64; system=linux;; |
| | | 69 | x86_64-*-cygwin*) arch=amd64; system=cygwin;; |
| | | 70 | + x86_64-*-solaris*) arch=amd64; system=solaris;; |
| | | 71 | esac |
| | | 72 | |
| | | 73 | # Some platforms exist both in 32-bit and 64-bit variants, not distinguished |
| | | 74 | @@ -923,7 +928,6 @@ case "$arch,$nativecc,$system,$model" in |
67 | *,*,nextstep,*) nativecclinkopts="-posix";; | | 75 | *,*,nextstep,*) nativecclinkopts="-posix";; |
68 | *,*,rhapsody,*) if $arch64; then partialld="ld -r -arch ppc64"; fi;; | | 76 | *,*,rhapsody,*) if $arch64; then partialld="ld -r -arch ppc64"; fi;; |
69 | amd64,gcc*,macosx,*) partialld="ld -r -arch x86_64";; | | 77 | amd64,gcc*,macosx,*) partialld="ld -r -arch x86_64";; |
70 | - amd64,gcc*,solaris,*) partialld="ld -r -m elf_x86_64";; | | 78 | - amd64,gcc*,solaris,*) partialld="ld -r -m elf_x86_64";; |
71 | power,gcc*,elf,ppc) partialld="ld -r -m elf32ppclinux";; | | 79 | power,gcc*,elf,ppc) partialld="ld -r -m elf32ppclinux";; |
72 | power,gcc*,elf,ppc64) partialld="ld -r -m elf64ppc";; | | 80 | power,gcc*,elf,ppc64) partialld="ld -r -m elf64ppc";; |
73 | power,gcc*,elf,ppc64le) partialld="ld -r -m elf64lppc";; | | 81 | power,gcc*,elf,ppc64le) partialld="ld -r -m elf64lppc";; |
74 | @@ -941,8 +944,8 @@ case "$arch,$system" in | | 82 | @@ -941,8 +945,8 @@ case "$arch,$system" in |
75 | fi;; | | 83 | fi;; |
76 | amd64,solaris) as="${TOOLPREF}as --64" | | 84 | amd64,solaris) as="${TOOLPREF}as --64" |
77 | aspp="${TOOLPREF}gcc -m64 -c";; | | 85 | aspp="${TOOLPREF}gcc -m64 -c";; |
78 | - i386,solaris) as="${TOOLPREF}as" | | 86 | - i386,solaris) as="${TOOLPREF}as" |
79 | - aspp="${TOOLPREF}gcc -c";; | | 87 | - aspp="${TOOLPREF}gcc -c";; |
80 | + i386,solaris) as="${TOOLPREF}as --32" | | 88 | + i386,solaris) as="${TOOLPREF}as --32" |
81 | + aspp="${TOOLPREF}gcc -m32 -c";; | | 89 | + aspp="${TOOLPREF}gcc -m32 -c";; |
82 | power,elf) if $arch64; then | | 90 | power,elf) if $arch64; then |
83 | as="${TOOLPREF}as -a64 -mppc64" | | 91 | as="${TOOLPREF}as -a64 -mppc64" |
84 | aspp="${TOOLPREF}gcc -m64 -c" | | 92 | aspp="${TOOLPREF}gcc -m64 -c" |
85 | @@ -991,6 +994,7 @@ case "$arch,$system" in | | 93 | @@ -991,6 +995,7 @@ case "$arch,$system" in |
86 | arm,linux*) profiling='prof';; | | 94 | arm,linux*) profiling='prof';; |
87 | power,elf) profiling='prof';; | | 95 | power,elf) profiling='prof';; |
88 | power,bsd*) profiling='prof';; | | 96 | power,bsd*) profiling='prof';; |
89 | + *,*,dragonfly) profiling='prof';; | | 97 | + *,*,dragonfly) profiling='prof';; |
90 | *) profiling='noprof';; | | 98 | *) profiling='noprof';; |
91 | esac | | 99 | esac |
92 | | | 100 | |
93 | @@ -1554,6 +1558,8 @@ fi | | 101 | @@ -1554,6 +1559,8 @@ fi |
94 | x11_include="not found" | | 102 | x11_include="not found" |
95 | x11_link="not found" | | 103 | x11_link="not found" |
96 | | | 104 | |
97 | +if test "$disable_x11" != "yes"; then | | 105 | +if test "$disable_x11" != "yes"; then |
98 | + | | 106 | + |
99 | if test -z "$x11_include_dir" -a -z "$x11_lib_dir"; then | | 107 | if test -z "$x11_include_dir" -a -z "$x11_lib_dir"; then |
100 | if pkg-config --exists x11 2>/dev/null; then | | 108 | if pkg-config --exists x11 2>/dev/null; then |
101 | x11_include=`pkg-config --cflags x11` | | 109 | x11_include=`pkg-config --cflags x11` |
102 | @@ -1600,6 +1606,7 @@ if test "$x11_include" = "not found"; th | | 110 | @@ -1600,6 +1607,7 @@ if test "$x11_include" = "not found"; th |
103 | /usr/XFree86/include/X11 \ | | 111 | /usr/XFree86/include/X11 \ |
104 | \ | | 112 | \ |
105 | /usr/include \ | | 113 | /usr/include \ |
106 | + /usr/pkg/include \ | | 114 | + /usr/pkg/include \ |
107 | /usr/local/include \ | | 115 | /usr/local/include \ |
108 | /usr/unsupported/include \ | | 116 | /usr/unsupported/include \ |
109 | /usr/athena/include \ | | 117 | /usr/athena/include \ |
110 | @@ -1657,6 +1664,7 @@ if test "$x11_include" = "not found"; th | | 118 | @@ -1657,6 +1665,7 @@ if test "$x11_include" = "not found"; th |
111 | \ | | 119 | \ |
112 | /usr/lib64 \ | | 120 | /usr/lib64 \ |
113 | /usr/lib \ | | 121 | /usr/lib \ |
114 | + /usr/pkg/lib \ | | 122 | + /usr/pkg/lib \ |
115 | /usr/local/lib \ | | 123 | /usr/local/lib \ |
116 | /usr/unsupported/lib \ | | 124 | /usr/unsupported/lib \ |
117 | /usr/athena/lib \ | | 125 | /usr/athena/lib \ |
118 | @@ -1678,19 +1686,16 @@ if test "$x11_include" = "not found"; th | | 126 | @@ -1678,19 +1687,16 @@ if test "$x11_include" = "not found"; th |
119 | if test $dir = /usr/lib; then | | 127 | if test $dir = /usr/lib; then |
120 | x11_link="-lX11" | | 128 | x11_link="-lX11" |
121 | else | | 129 | else |
122 | - x11_libs="-L$dir" | | 130 | - x11_libs="-L$dir" |
123 | - case "$target" in | | 131 | - case "$target" in |
124 | - *-*-freebsd*|*-*-dragonfly*) x11_link="-L$dir -lX11";; | | 132 | - *-*-freebsd*|*-*-dragonfly*) x11_link="-L$dir -lX11";; |
125 | - *-kfreebsd*-gnu) x11_link="-L$dir -lX11";; | | 133 | - *-kfreebsd*-gnu) x11_link="-L$dir -lX11";; |
126 | - *-*-*bsd*) x11_link="-R$dir -L$dir -lX11";; | | 134 | - *-*-*bsd*) x11_link="-R$dir -L$dir -lX11";; |
127 | - *) x11_link="-L$dir -lX11";; | | 135 | - *) x11_link="-L$dir -lX11";; |
128 | - esac | | 136 | - esac |
129 | + x11_libs="-L$dir ${COMPILER_RPATH_FLAG}$dir" | | 137 | + x11_libs="-L$dir ${COMPILER_RPATH_FLAG}$dir" |
130 | + x11_link="-L$dir ${COMPILER_RPATH_FLAG}$dir -lX11" | | 138 | + x11_link="-L$dir ${COMPILER_RPATH_FLAG}$dir -lX11" |
131 | fi | | 139 | fi |