From d7fcd8e57b9f1b98524395ce3756678efb36e214 Mon Sep 17 00:00:00 2001 From: Mohamed Akram Date: Fri, 28 Apr 2017 16:01:09 +0400 Subject: [PATCH 1/5] Add CC option to configure original commit: 1a65f0bef4c2af6016c328f7f1151e6d10e342fa --- LOG | 1 + c/Mf-a6fb | 8 ++++---- c/Mf-a6le | 8 ++++---- c/Mf-a6nb | 8 ++++---- c/Mf-a6ob | 8 ++++---- c/Mf-a6osx | 2 +- c/Mf-a6s2 | 8 ++++---- c/Mf-arm32le | 8 ++++---- c/Mf-i3fb | 8 ++++---- c/Mf-i3le | 8 ++++---- c/Mf-i3nb | 8 ++++---- c/Mf-i3ob | 8 ++++---- c/Mf-i3osx | 8 ++++---- c/Mf-i3s2 | 8 ++++---- c/Mf-ppc32le | 8 ++++---- c/Mf-ta6fb | 8 ++++---- c/Mf-ta6le | 8 ++++---- c/Mf-ta6nb | 8 ++++---- c/Mf-ta6ob | 8 ++++---- c/Mf-ta6osx | 2 +- c/Mf-ta6s2 | 8 ++++---- c/Mf-ti3fb | 8 ++++---- c/Mf-ti3le | 8 ++++---- c/Mf-ti3nb | 8 ++++---- c/Mf-ti3ob | 8 ++++---- c/Mf-ti3osx | 8 ++++---- c/Mf-ti3s2 | 8 ++++---- c/Mf-tppc32le | 8 ++++---- configure | 5 +++++ 29 files changed, 108 insertions(+), 102 deletions(-) diff --git a/LOG b/LOG index 756badf8f3..e9de335b03 100644 --- a/LOG +++ b/LOG @@ -450,3 +450,4 @@ Also add a simplification for for-each with empty lists with optimization level 2. cp0.ss, 4.ms, primdata.ss +- added CC option to configure for selecting the compiler diff --git a/c/Mf-a6fb b/c/Mf-a6fb index 637a2c2cc2..9a55d7ae89 100644 --- a/c/Mf-a6fb +++ b/c/Mf-a6fb @@ -1,12 +1,12 @@ # Mf-a6fb # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,7 @@ Cpu = X86_64 mdinclude = -I/usr/local/include -I/usr/X11R6/include mdclib = -L/usr/local/lib -liconv -lm -lncurses -C = gcc ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O ${CFLAGS} +C = ${CC} ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-a6le b/c/Mf-a6le index d5b9281a22..7ee9e56d74 100644 --- a/c/Mf-a6le +++ b/c/Mf-a6le @@ -1,12 +1,12 @@ # Mf-a6le # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +17,7 @@ m = a6le Cpu = X86_64 mdclib = -lm -ldl -lncurses -lrt -C = gcc ${CPPFLAGS} -m64 -msse2 -Wpointer-arith -Wall -Wextra -Werror -O2 ${CFLAGS} +C = ${CC} ${CPPFLAGS} -m64 -msse2 -Wpointer-arith -Wall -Wextra -Werror -O2 ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-a6nb b/c/Mf-a6nb index 01ed4c9db8..f3869b360e 100644 --- a/c/Mf-a6nb +++ b/c/Mf-a6nb @@ -1,12 +1,12 @@ # Mf-a6nb # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,7 @@ Cpu = X86_64 mdinclude = -I/usr/X11R7/include -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/local/include -I/usr/X11R6/include mdclib = /usr/lib/i18n/libiconv_std.a -lm /usr/pkg/lib/libncurses.a -C = gcc ${CPPFLAGS} -m64 -Wpointer-arith -Wextra -Werror -O ${CFLAGS} +C = ${CC} ${CPPFLAGS} -m64 -Wpointer-arith -Wextra -Werror -O ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-a6ob b/c/Mf-a6ob index ad35c55921..03ab059065 100644 --- a/c/Mf-a6ob +++ b/c/Mf-a6ob @@ -1,12 +1,12 @@ # Mf-a6ob # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,7 @@ Cpu = X86_64 mdinclude = -I/usr/local/include -I/usr/X11R6/include mdclib = -L/usr/local/lib -liconv -lm -lncurses -C = gcc ${CPPFLAGS} -Wpointer-arith -Werror -O ${CFLAGS} +C = ${CC} ${CPPFLAGS} -Wpointer-arith -Werror -O ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-a6osx b/c/Mf-a6osx index b9dc729fb3..fe0756b378 100644 --- a/c/Mf-a6osx +++ b/c/Mf-a6osx @@ -17,7 +17,7 @@ m = a6osx Cpu = X86_64 mdclib = -liconv -lm -lncurses -C = gcc ${CPPFLAGS} -m64 -Wpointer-arith -Wall -Wextra -Werror -O2 -I/opt/X11/include/ ${CFLAGS} +C = ${CC} ${CPPFLAGS} -m64 -Wpointer-arith -Wall -Wextra -Werror -O2 -I/opt/X11/include/ ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-a6s2 b/c/Mf-a6s2 index cb35ec2a68..6d172cc73b 100644 --- a/c/Mf-a6s2 +++ b/c/Mf-a6s2 @@ -1,12 +1,12 @@ # Mf-a6s2 # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +17,7 @@ m = a6s2 Cpu = X86_64 mdclib = -lnsl -ldl -lm -lcurses -lrt -C = gcc ${CPPFLAGS} -m64 -Wpointer-arith -Wextra -Werror -O ${CFLAGS} +C = ${CC} ${CPPFLAGS} -m64 -Wpointer-arith -Wextra -Werror -O ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-arm32le b/c/Mf-arm32le index da2e03a806..4ef3a9fee1 100644 --- a/c/Mf-arm32le +++ b/c/Mf-arm32le @@ -1,12 +1,12 @@ # Mf-arm32le # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +17,7 @@ m = arm32le Cpu = ARMV6 mdclib = -lm -ldl -lncurses -lrt -C = gcc ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O2 ${CFLAGS} +C = ${CC} ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O2 ${CFLAGS} o = o mdsrc = arm32le.c mdobj = arm32le.o diff --git a/c/Mf-i3fb b/c/Mf-i3fb index 1f95d66857..834d8ab846 100644 --- a/c/Mf-i3fb +++ b/c/Mf-i3fb @@ -1,12 +1,12 @@ # Mf-i3fb # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,7 @@ Cpu = I386 mdinclude = -I/usr/local/include -I/usr/X11R6/include mdclib = -L/usr/local/lib -liconv -lm -lncurses -C = gcc ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O ${CFLAGS} +C = ${CC} ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-i3le b/c/Mf-i3le index 3113feb56d..25b8541881 100644 --- a/c/Mf-i3le +++ b/c/Mf-i3le @@ -1,12 +1,12 @@ # Mf-i3le # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +17,7 @@ m = i3le Cpu = I386 mdclib = -lm -ldl -lncurses -lrt -C = gcc ${CPPFLAGS} -m32 -msse2 -Wpointer-arith -Wall -Wextra -Werror -O2 -fno-stack-protector ${CFLAGS} +C = ${CC} ${CPPFLAGS} -m32 -msse2 -Wpointer-arith -Wall -Wextra -Werror -O2 -fno-stack-protector ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-i3nb b/c/Mf-i3nb index 27fe7a0ecd..f7378865c1 100644 --- a/c/Mf-i3nb +++ b/c/Mf-i3nb @@ -1,12 +1,12 @@ # Mf-i3nb # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,7 @@ Cpu = I386 mdinclude = -I/usr/X11R7/include -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/X11R6/include mdclib = /usr/lib/i18n/libiconv_std.a -lm /usr/pkg/lib/libncurses.a -C = gcc ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O ${CFLAGS} +C = ${CC} ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-i3ob b/c/Mf-i3ob index 06753044e5..ee9ceec21b 100644 --- a/c/Mf-i3ob +++ b/c/Mf-i3ob @@ -1,12 +1,12 @@ # Mf-i3ob # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,7 @@ Cpu = I386 mdinclude = -I/usr/local/include -I/usr/X11R6/include mdclib = -L/usr/local/lib -liconv -lm -lncurses -C = gcc ${CPPFLAGS} -Wpointer-arith -Werror -O ${CFLAGS} +C = ${CC} ${CPPFLAGS} -Wpointer-arith -Werror -O ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-i3osx b/c/Mf-i3osx index 58c1039faf..833cea7ee0 100644 --- a/c/Mf-i3osx +++ b/c/Mf-i3osx @@ -1,12 +1,12 @@ # Mf-i3osx # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +17,7 @@ m = i3osx Cpu = I386 mdclib = -liconv -lm -lncurses -C = gcc ${CPPFLAGS} -m32 -Wpointer-arith -Wall -Wextra -Werror -O2 -msse2 -I/opt/X11/include/ ${CFLAGS} +C = ${CC} ${CPPFLAGS} -m32 -Wpointer-arith -Wall -Wextra -Werror -O2 -msse2 -I/opt/X11/include/ ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-i3s2 b/c/Mf-i3s2 index 29cc0ffbb9..7f2c52963d 100644 --- a/c/Mf-i3s2 +++ b/c/Mf-i3s2 @@ -1,12 +1,12 @@ # Mf-i3s2 # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +17,7 @@ m = i3s2 Cpu = I386 mdclib = -lnsl -ldl -lm -lcurses -lrt -C = gcc ${CFLAGS} -m32 -Wpointer-arith -Wextra -Werror -O ${CPPFLAGS} +C = ${CC} ${CFLAGS} -m32 -Wpointer-arith -Wextra -Werror -O ${CPPFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-ppc32le b/c/Mf-ppc32le index 62bac563f4..b18c38ed74 100644 --- a/c/Mf-ppc32le +++ b/c/Mf-ppc32le @@ -1,12 +1,12 @@ # Mf-ppc32le # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +17,7 @@ m = ppc32le Cpu = PPC32 mdclib = -lm -ldl -lncurses -lrt -C = gcc ${CPPFLAGS} -m32 -Wpointer-arith -Wextra -Werror -O2 ${CFLAGS} +C = ${CC} ${CPPFLAGS} -m32 -Wpointer-arith -Wextra -Werror -O2 ${CFLAGS} o = o mdsrc = ppc32.c mdobj = ppc32.o diff --git a/c/Mf-ta6fb b/c/Mf-ta6fb index 9c3e28b633..81800dcacc 100644 --- a/c/Mf-ta6fb +++ b/c/Mf-ta6fb @@ -1,12 +1,12 @@ # Mf-ta6fb # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,7 @@ Cpu = X86_64 mdinclude = -I/usr/local/include -I/usr/X11R6/include mdclib = -L/usr/local/lib -liconv -lm -lncurses -lpthread -C = gcc ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} +C = ${CC} ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-ta6le b/c/Mf-ta6le index eb443c2b97..d7d5f30e42 100644 --- a/c/Mf-ta6le +++ b/c/Mf-ta6le @@ -1,12 +1,12 @@ # Mf-ta6le # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +17,7 @@ m = ta6le Cpu = X86_64 mdclib = -lm -ldl -lncurses -lpthread -lrt -C = gcc ${CPPFLAGS} -m64 -msse2 -Wpointer-arith -Wall -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} +C = ${CC} ${CPPFLAGS} -m64 -msse2 -Wpointer-arith -Wall -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-ta6nb b/c/Mf-ta6nb index 02ce0f3b4d..6dbd83c74a 100644 --- a/c/Mf-ta6nb +++ b/c/Mf-ta6nb @@ -1,12 +1,12 @@ # Mf-ta6nb # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,7 @@ Cpu = X86_64 mdinclude = -I/usr/X11R7/include -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/X11R6/include mdclib = /usr/lib/i18n/libiconv_std.a -lm /usr/pkg/lib/libncurses.a -lpthread -C = gcc ${CPPFLAGS} -m64 -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} +C = ${CC} ${CPPFLAGS} -m64 -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-ta6ob b/c/Mf-ta6ob index 617517e653..45e29e8955 100644 --- a/c/Mf-ta6ob +++ b/c/Mf-ta6ob @@ -1,12 +1,12 @@ # Mf-ta6ob # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,7 @@ Cpu = X86_64 mdinclude = -I/usr/local/include -I/usr/X11R6/include mdclib = -L/usr/local/lib -liconv -lm -lncurses -lpthread -C = gcc ${CPPFLAGS} -Wpointer-arith -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} +C = ${CC} ${CPPFLAGS} -Wpointer-arith -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-ta6osx b/c/Mf-ta6osx index d6a6002aac..15fe45b375 100644 --- a/c/Mf-ta6osx +++ b/c/Mf-ta6osx @@ -17,7 +17,7 @@ m = ta6osx Cpu = X86_64 mdclib = -liconv -lm -lncurses -C = gcc ${CPPFLAGS} -m64 -Wpointer-arith -Wall -Wextra -Werror -O2 -I/opt/X11/include/ ${CFLAGS} +C = ${CC} ${CPPFLAGS} -m64 -Wpointer-arith -Wall -Wextra -Werror -O2 -I/opt/X11/include/ ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-ta6s2 b/c/Mf-ta6s2 index d31c08165a..ed260d054c 100644 --- a/c/Mf-ta6s2 +++ b/c/Mf-ta6s2 @@ -1,12 +1,12 @@ # Mf-ta6s2 # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +17,7 @@ m = ta6s2 Cpu = X86_64 mdclib = -lnsl -ldl -lm -lpthread -lcurses -lrt -C = gcc ${CPPFLAGS} -m64 -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT ${CFLAGS} +C = ${CC} ${CPPFLAGS} -m64 -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-ti3fb b/c/Mf-ti3fb index 589607bb97..58af09cfcd 100644 --- a/c/Mf-ti3fb +++ b/c/Mf-ti3fb @@ -1,12 +1,12 @@ # Mf-ti3fb # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,7 @@ Cpu = I386 mdinclude = -I/usr/local/include -I/usr/X11R6/include mdclib = -L/usr/local/lib -liconv -lm -lncurses -lpthread -C = gcc ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} +C = ${CC} ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-ti3le b/c/Mf-ti3le index 2b284eac51..98c183fa1b 100644 --- a/c/Mf-ti3le +++ b/c/Mf-ti3le @@ -1,12 +1,12 @@ # Mf-ti3le # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +17,7 @@ m = ti3le Cpu = I386 mdclib = -lm -ldl -lncurses -lpthread -lrt -C = gcc ${CPPFLAGS} -m32 -msse2 -Wpointer-arith -Wall -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} +C = ${CC} ${CPPFLAGS} -m32 -msse2 -Wpointer-arith -Wall -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-ti3nb b/c/Mf-ti3nb index 528e7526ee..fd102dce25 100644 --- a/c/Mf-ti3nb +++ b/c/Mf-ti3nb @@ -1,12 +1,12 @@ # Mf-ti3nb # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,7 @@ Cpu = I386 mdinclude = -I/usr/X11R7/include -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/X11R6/include mdclib = /usr/lib/i18n/libiconv_std.a -lm /usr/pkg/lib/libncurses.a -lpthread -C = gcc ${CPPFLAGS} -m32 -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} +C = ${CC} ${CPPFLAGS} -m32 -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-ti3ob b/c/Mf-ti3ob index 418b729f32..b6b529fd91 100644 --- a/c/Mf-ti3ob +++ b/c/Mf-ti3ob @@ -1,12 +1,12 @@ # Mf-ti3ob # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,7 @@ Cpu = I386 mdinclude = -I/usr/local/include -I/usr/X11R6/include mdclib = -L/usr/local/lib -liconv -lm -lncurses -lpthread -C = gcc ${CPPFLAGS} -Wpointer-arith -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} +C = ${CC} ${CPPFLAGS} -Wpointer-arith -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-ti3osx b/c/Mf-ti3osx index 83e48af325..27d3e62bfc 100644 --- a/c/Mf-ti3osx +++ b/c/Mf-ti3osx @@ -1,12 +1,12 @@ # Mf-ti3osx # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +17,7 @@ m = ti3osx Cpu = I386 mdclib = -liconv -lm -lncurses -C = gcc ${CPPFLAGS} -m32 -Wpointer-arith -Wall -Wextra -Werror -O2 -msse2 -I/opt/X11/include/ ${CFLAGS} +C = ${CC} ${CPPFLAGS} -m32 -Wpointer-arith -Wall -Wextra -Werror -O2 -msse2 -I/opt/X11/include/ ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-ti3s2 b/c/Mf-ti3s2 index 3d0b128251..2f9ec15e5f 100644 --- a/c/Mf-ti3s2 +++ b/c/Mf-ti3s2 @@ -1,12 +1,12 @@ # Mf-ti3s2 # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +17,7 @@ m = ti3s2 Cpu = I386 mdclib = -lnsl -ldl -lm -lpthread -lcurses -lrt -C = gcc ${CPPFLAGS} -m32 -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT ${CFLAGS} +C = ${CC} ${CPPFLAGS} -m32 -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT ${CFLAGS} o = o mdsrc = i3le.c mdobj = i3le.o diff --git a/c/Mf-tppc32le b/c/Mf-tppc32le index 074546d949..73fe9d5746 100644 --- a/c/Mf-tppc32le +++ b/c/Mf-tppc32le @@ -1,12 +1,12 @@ # Mf-tppc32le # Copyright 1984-2017 Cisco Systems, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +17,7 @@ m = tppc32le Cpu = PPC32 mdclib = -lm -ldl -lncurses -lpthread -lrt -C = gcc ${CPPFLAGS} -m32 -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} +C = ${CC} ${CPPFLAGS} -m32 -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS} o = o mdsrc = ppc32le.c mdobj = ppc32le.o diff --git a/configure b/configure index 577b3b4003..e0a86a6168 100755 --- a/configure +++ b/configure @@ -37,6 +37,7 @@ installman="" installschemename="scheme" installpetitename="petite" installscriptname="scheme-script" +: ${CC:="gcc"} : ${CPPFLAGS:=""} : ${CFLAGS:=""} : ${LDFLAGS:=""} @@ -191,6 +192,9 @@ while [ $# != 0 ] ; do --help) help=yes ;; + CC=*) + CC=`echo $1 | sed -e 's/^CC=//'` + ;; CPPFLAGS=*) CPPFLAGS=`echo $1 | sed -e 's/^CPPFLAGS=//'` ;; @@ -348,6 +352,7 @@ cat > $w/c/config.h << END END cat > $w/c/Mf-config << END +CC=$CC CPPFLAGS=$CPPFLAGS CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS From 2d63f03442cacf6991e0d2260f3f3fde29e18279 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 1 May 2017 20:08:59 -0600 Subject: [PATCH 2/5] support Windows build on Bash/WSL original commit: 7e4782db08210cbacd1bbe46b3a5e166d8dbe20f --- BUILDING | 13 ++++++++----- LOG | 3 +++ c/Mf-a6nt | 20 ++------------------ c/Mf-i3nt | 17 ++--------------- c/Mf-ta6nt | 20 ++------------------ c/Mf-ti3nt | 17 ++--------------- c/vs.bat | 39 +++++++++++++++++++++++++++++++++++++++ configure | 10 +++++++++- mats/Mf-a6nt | 4 ++-- mats/Mf-base | 10 +++++++++- mats/Mf-i3nt | 4 ++-- mats/Mf-ta6nt | 4 ++-- mats/Mf-ti3nt | 4 ++-- mats/vs.bat | 3 +++ s/Mf-base | 11 +++++++++-- workarea | 11 +++++++++++ 16 files changed, 107 insertions(+), 83 deletions(-) create mode 100644 c/vs.bat create mode 100644 mats/vs.bat diff --git a/BUILDING b/BUILDING index a3b411fd6e..59f9f18265 100644 --- a/BUILDING +++ b/BUILDING @@ -167,15 +167,18 @@ The make file supports several targets: WINDOWS -Building Chez Scheme under Windows with Cygwin follows the -instructions above except that make install is not supported: +Building Chez Scheme under Windows with Cygwin or Bash/WSL follows the +instructions above, except that 'make install' is not supported, and +the 'OS' environment variable must be set to 'Windows_NT' on Bash/WSL +(to indicate a build for Windows, as opposed to a build for Linux on +Windows): -./configure -make +env OS=Windows_NT ./configure +env OS=Windows_NT make Prerequisites: -* Cygwin with bash, grep, make, sed, etc. +* Cygwin or Bash/WSL with bash, grep, make, sed, etc. * Microsoft Visual Studio 2015 * WiX Toolset (for making an install) diff --git a/LOG b/LOG index 756badf8f3..1bdb8c5b54 100644 --- a/LOG +++ b/LOG @@ -450,3 +450,6 @@ Also add a simplification for for-each with empty lists with optimization level 2. cp0.ss, 4.ms, primdata.ss +- support Windows build on Bash/WSL + BUILDING, configure, workarea, c/vs.bat (new), mats/vs.bat (new), + c/Mf-*nt, mats/Mf-*, s/Mf-base diff --git a/c/Mf-a6nt b/c/Mf-a6nt index d9190b2a91..8b51ff88d9 100644 --- a/c/Mf-a6nt +++ b/c/Mf-a6nt @@ -25,27 +25,11 @@ mdclean=vs.bat make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe* include Mf-base ${Scheme}: make.bat - ./make.bat + cmd.exe /c make.bat cp ../bin/$m/scheme.exe ../bin/$m/petite.exe -vs.bat: - echo '@echo off' > $@ - echo 'if "%VS140COMNTOOLS%" neq "" goto :VS' >> $@ - echo 'echo Visual Studio 2015 must be installed.' >> $@ - echo 'exit 1' >> $@ - echo ':VS' >> $@ - echo 'set INCLUDE=' >> $@ - echo 'set LIB=' >> $@ - echo 'set LIBPATH=' >> $@ - echo 'set MACHINETYPE=amd64' >> $@ - echo 'if exist "%VS140COMNTOOLS%..\..\VC\bin\x86_amd64\vcvarsx86_amd64.bat" set MACHINETYPE=x86_amd64' >> $@ - echo 'if exist "%VS140COMNTOOLS%..\..\VC\bin\amd64\vcvars64.bat" set MACHINETYPE=amd64' >> $@ - echo 'call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %MACHINETYPE%' >> $@ - echo '%*' >> $@ - chmod +x $@ - make.bat: vs.bat echo '@echo off' > $@ echo 'set MAKEFLAGS=' >> $@ - echo 'call vs.bat nmake /f Makefile.$m /nologo %*' >> $@ + echo 'vs.bat x86_amd64 amd64 && nmake /f Makefile.$m /nologo %*' >> $@ chmod +x $@ diff --git a/c/Mf-i3nt b/c/Mf-i3nt index b41c755208..855721aa9d 100644 --- a/c/Mf-i3nt +++ b/c/Mf-i3nt @@ -25,24 +25,11 @@ mdclean=vs.bat make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe* include Mf-base ${Scheme}: make.bat - ./make.bat + cmd.exe /c make.bat cp ../bin/$m/scheme.exe ../bin/$m/petite.exe -vs.bat: - echo '@echo off' > $@ - echo 'if "%VS140COMNTOOLS%" neq "" goto :VS' >> $@ - echo 'echo Visual Studio 2015 must be installed.' >> $@ - echo 'exit 1' >> $@ - echo ':VS' >> $@ - echo 'set INCLUDE=' >> $@ - echo 'set LIB=' >> $@ - echo 'set LIBPATH=' >> $@ - echo 'call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86' >> $@ - echo '%*' >> $@ - chmod +x $@ - make.bat: vs.bat echo '@echo off' > $@ echo 'set MAKEFLAGS=' >> $@ - echo 'call vs.bat nmake /f Makefile.$m /nologo %*' >> $@ + echo 'vs.bat x86 && nmake /f Makefile.$m /nologo %*' >> $@ chmod +x $@ diff --git a/c/Mf-ta6nt b/c/Mf-ta6nt index 0129efd815..35638cb319 100644 --- a/c/Mf-ta6nt +++ b/c/Mf-ta6nt @@ -25,27 +25,11 @@ mdclean=vs.bat make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe* include Mf-base ${Scheme}: make.bat - ./make.bat + cmd.exe /c make.bat cp ../bin/$m/scheme.exe ../bin/$m/petite.exe -vs.bat: - echo '@echo off' > $@ - echo 'if "%VS140COMNTOOLS%" neq "" goto :VS' >> $@ - echo 'echo Visual Studio 2015 must be installed.' >> $@ - echo 'exit 1' >> $@ - echo ':VS' >> $@ - echo 'set INCLUDE=' >> $@ - echo 'set LIB=' >> $@ - echo 'set LIBPATH=' >> $@ - echo 'set MACHINETYPE=amd64' >> $@ - echo 'if exist "%VS140COMNTOOLS%..\..\VC\bin\x86_amd64\vcvarsx86_amd64.bat" set MACHINETYPE=x86_amd64' >> $@ - echo 'if exist "%VS140COMNTOOLS%..\..\VC\bin\amd64\vcvars64.bat" set MACHINETYPE=amd64' >> $@ - echo 'call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %MACHINETYPE%' >> $@ - echo '%*' >> $@ - chmod +x $@ - make.bat: vs.bat echo '@echo off' > $@ echo 'set MAKEFLAGS=' >> $@ - echo 'call vs.bat nmake /f Makefile.$m /nologo %*' >> $@ + echo 'vs.bat x86_amd64 amd64 && nmake /f Makefile.$m /nologo %*' >> $@ chmod +x $@ diff --git a/c/Mf-ti3nt b/c/Mf-ti3nt index b2ac822097..5503422757 100644 --- a/c/Mf-ti3nt +++ b/c/Mf-ti3nt @@ -25,24 +25,11 @@ mdclean=vs.bat make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe* include Mf-base ${Scheme}: make.bat - ./make.bat + cmd.exe /c make.bat cp ../bin/$m/scheme.exe ../bin/$m/petite.exe -vs.bat: - echo '@echo off' > $@ - echo 'if "%VS140COMNTOOLS%" neq "" goto :VS' >> $@ - echo 'echo Visual Studio 2015 must be installed.' >> $@ - echo 'exit 1' >> $@ - echo ':VS' >> $@ - echo 'set INCLUDE=' >> $@ - echo 'set LIB=' >> $@ - echo 'set LIBPATH=' >> $@ - echo 'call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86' >> $@ - echo '%*' >> $@ - chmod +x $@ - make.bat: vs.bat echo '@echo off' > $@ echo 'set MAKEFLAGS=' >> $@ - echo 'call vs.bat nmake /f Makefile.$m /nologo %*' >> $@ + echo 'vs.bat x86 && nmake /f Makefile.$m /nologo %*' >> $@ chmod +x $@ diff --git a/c/vs.bat b/c/vs.bat new file mode 100644 index 0000000000..103db58cd6 --- /dev/null +++ b/c/vs.bat @@ -0,0 +1,39 @@ +@echo off + +:: Set up Visual Studio command line environment variables given a +:: sequence of machine types to try ("x86", "x86_amd64", and "amd64"). + +:: Note: VS 11.0 (2012) and earlier won't work, because they +:: don't support C99 mid-block declarations. Also, there's no +:: such thing as VS 13.0. + +:: Clear environment variables that we might otherwise inherit +set INCLUDE= +set LIB= +set LIBPATH= + +:: Find visual studio +set VCDIR=%VS140COMNTOOLS%\..\..\vc +if not exist "%VCDIR%\vcvarsall.bat" set VCDIR=%VS120COMNTOOLS%\..\..\vc + +:: Loop to find a requested machine type +if exist "%VCDIR%\vcvarsall.bat" goto :VCDIR +echo Could not find Visual Studio installed. +exit 1 + +:VCDIR + +set MACHINETYPE=%1 +if "%MACHINETYPE%" neq "" goto :MACHINE +echo Could not find working machine type. +exit 1 + +:MACHINE +if "%MACHINETYPE%" == "x86" goto :VS +if exist "%VCDIR%\bin\%MACHINETYPE%\vcvars%MACHINETYPE%.bat" goto :VS +shift +goto :VCDIR + +:: Set environment variables +:VS +"%VCDIR%\vcvarsall.bat" %MACHINETYPE% diff --git a/configure b/configure index 577b3b4003..b048237251 100755 --- a/configure +++ b/configure @@ -41,7 +41,15 @@ installscriptname="scheme-script" : ${CFLAGS:=""} : ${LDFLAGS:=""} -case `uname` in +# On WSL, set OS to "Windows_NT" to create a Windows +# build instead of a Linux (on Windows) build: +if [ "$OS" = "Windows_NT" ] ; then + CONFIG_UNAME="CYGWIN_NT-" +else + CONFIG_UNAME=`uname` +fi + +case "${CONFIG_UNAME}" in Linux) if uname -a | egrep 'i386|i686|amd64|athlon|x86_64' > /dev/null 2>&1 ; then m32=i3le diff --git a/mats/Mf-a6nt b/mats/Mf-a6nt index 333892e41e..6fec7b426e 100644 --- a/mats/Mf-a6nt +++ b/mats/Mf-a6nt @@ -22,7 +22,7 @@ mdclean = cat_flush.exe cat_flush.obj foreign1.exp foreign1.lib foreign1.obj for include Mf-base foreign1.so: $(fsrc) - ../c/vs.bat cl /DWIN32 /DX86_64 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv941.lib $(fsrc) + cmd.exe /c "vs.bat x86_amd64 amd64 && cl /DWIN32 /DX86_64 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv941.lib $(fsrc)" cat_flush: cat_flush.c - ../c/vs.bat cl /DWIN32 /DX86_64 /MD /nologo $< + cmd.exe /c "vs.bat x86_amd64 amd64 && cl /DWIN32 /DX86_64 /MD /nologo $<" diff --git a/mats/Mf-base b/mats/Mf-base index f4486d669c..3ddca00b24 100644 --- a/mats/Mf-base +++ b/mats/Mf-base @@ -39,9 +39,17 @@ ifeq (${OS},Windows_NT) else dirsep = : endif + +# Explicit ".exe" needed for WSL +ifeq ($(OS),Windows_NT) + ExeSuffix = .exe +else + ExeSuffix = +endif + # Scheme is the scheme executable to test, and SCHEMEHEAPDIRS tells # it where to find its boot files -Scheme = ../bin/$m/scheme +Scheme = ../bin/$m/scheme${ExeSuffix} export SCHEMEHEAPDIRS=.${dirsep}../boot/%m # Include is the directory holding scheme.h. diff --git a/mats/Mf-i3nt b/mats/Mf-i3nt index 1c49b8a855..e76e0d35c0 100644 --- a/mats/Mf-i3nt +++ b/mats/Mf-i3nt @@ -22,7 +22,7 @@ mdclean = cat_flush.exe cat_flush.obj foreign1.exp foreign1.lib foreign1.obj for include Mf-base foreign1.so: $(fsrc) - ../c/vs.bat cl /DWIN32 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv941.lib $(fsrc) + cmd.exe /c "vs.bat x86 && cl /DWIN32 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv941.lib $(fsrc)" cat_flush: cat_flush.c - ../c/vs.bat cl /DWIN32 /MD /nologo $< + cmd.exe /c "vs.bat x86 && cl /DWIN32 /MD /nologo $<" diff --git a/mats/Mf-ta6nt b/mats/Mf-ta6nt index 3a6333045d..51f63e744d 100644 --- a/mats/Mf-ta6nt +++ b/mats/Mf-ta6nt @@ -22,7 +22,7 @@ mdclean = cat_flush.exe cat_flush.obj foreign1.exp foreign1.lib foreign1.obj for include Mf-base foreign1.so: $(fsrc) - ../c/vs.bat cl /DWIN32 /DX86_64 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv941.lib $(fsrc) + cmd.exe /c "vs.bat x86_amd64 amd64 && cl /DWIN32 /DX86_64 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv941.lib $(fsrc)" cat_flush: cat_flush.c - ../c/vs.bat cl /DWIN32 /DX86_64 /MD /nologo $< + cmd.exe /c "vs.bat x86_amd64 amd64 && cl /DWIN32 /DX86_64 /MD /nologo $<" diff --git a/mats/Mf-ti3nt b/mats/Mf-ti3nt index 85c1fdedbc..b6939e6d08 100644 --- a/mats/Mf-ti3nt +++ b/mats/Mf-ti3nt @@ -22,7 +22,7 @@ mdclean = cat_flush.exe cat_flush.obj foreign1.exp foreign1.lib foreign1.obj for include Mf-base foreign1.so: $(fsrc) - ../c/vs.bat cl /DWIN32 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv941.lib $(fsrc) + cmd.exe /c "vs.bat x86 && cl /DWIN32 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv941.lib $(fsrc)" cat_flush: cat_flush.c - ../c/vs.bat cl /DWIN32 /MD /nologo $< + cmd.exe /c "vs.bat x86 && cl /DWIN32 /MD /nologo $<" diff --git a/mats/vs.bat b/mats/vs.bat new file mode 100644 index 0000000000..85e733ed24 --- /dev/null +++ b/mats/vs.bat @@ -0,0 +1,3 @@ +:: Redirect to "..\c\vs.bat" without having to use +:: backslashes in the makefile +..\c\vs.bat %* diff --git a/s/Mf-base b/s/Mf-base index 9805933c4d..200d444394 100644 --- a/s/Mf-base +++ b/s/Mf-base @@ -67,10 +67,17 @@ gic = f # pps determines whether pass timings are printed pps = f +# Explicit ".exe" needed for WSL +ifeq ($(OS),Windows_NT) + ExeSuffix = .exe +else + ExeSuffix = +endif + # The following control where files sit and typically don't need to be changed, except # that Scheme and SCHEMEHEAPDIRS are set by Mf-cross to point to the host Scheme # implementation -Scheme = ../bin/$m/scheme +Scheme = ../bin/$m/scheme${ExeSuffix} export SCHEMEHEAPDIRS=../boot/%m # Define the libdirs separator character @@ -278,7 +285,7 @@ checkboot: '(#%$$fasl-file-equal? "../boot/$m/sbb" "../boot/$m/petite.boot" #t)'\ '(#%$$fasl-file-equal? "../boot/$m/scb" "../boot/$m/scheme.boot" #t)'\ '(printf "bootfile comparison succeeded\n"))'\ - | ../bin/$m/scheme -b ../boot/$m/sbb -q + | ../bin/$m/scheme${ExeSuffix} -b ../boot/$m/sbb -q xcheckboot: ${macroobj} ${patchfile} @echo '(reset-handler abort)'\ diff --git a/workarea b/workarea index efe290a866..31bfda6115 100755 --- a/workarea +++ b/workarea @@ -133,6 +133,12 @@ fi if [ ! -e $W/c/Mf-config ] ; then touch $W/c/Mf-config fi +case $M in + *nt) + (cd $W/c; workln ../../c/vs.bat vs.bat) + ;; +esac + workdir $W/s (cd $W/s; workln ../../s/Mf-$M Mf-$M) @@ -147,6 +153,11 @@ workdir $W/mats (cd $W/mats; forceworkln Mf-$M Makefile) (cd $W/mats; workln ../../mats/Mf-base Mf-base) (cd $W/mats; workln ../../mats/Mf-exobj Mf-exobj) +case $M in + *nt) + (cd $W/mats; workln ../../mats/vs.bat vs.bat) + ;; +esac for dir in `echo examples unicode` ; do workdir $W/$dir From ce437c7488cd9f9c89ee0da498ecc75d8084d5de Mon Sep 17 00:00:00 2001 From: Daniel Brunner Date: Fri, 2 Jun 2017 16:18:04 +0200 Subject: [PATCH 3/5] fixes wrong type for iconv This fixes issue #178, on FreeBSD the type should be `char **`. original commit: cc60b7d951770b0635186333f1c55d1704686630 --- c/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/version.h b/c/version.h index 30bd8bd9c4..7be60a1212 100644 --- a/c/version.h +++ b/c/version.h @@ -140,7 +140,7 @@ typedef int tputsputcchar; #define NSECATIME(sb) (sb).st_atimespec.tv_nsec #define NSECCTIME(sb) (sb).st_ctimespec.tv_nsec #define NSECMTIME(sb) (sb).st_mtimespec.tv_nsec -#define ICONV_INBUF_TYPE const char ** +#define ICONV_INBUF_TYPE char ** #define UNUSED __attribute__((__unused__)) #endif From 46651d2f22ab55689b2c5d483f1082bf0dc2846b Mon Sep 17 00:00:00 2001 From: Daniel Brunner Date: Fri, 2 Jun 2017 16:28:14 +0200 Subject: [PATCH 4/5] adds entry to LOG original commit: b6951c9b8b55a63c304ca226caee632c4792931d --- LOG | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LOG b/LOG index f3954e4524..6d17a5c72d 100644 --- a/LOG +++ b/LOG @@ -477,3 +477,5 @@ - fix strip-fasl-file for immutable strings and vectors, fix an $oops call, and fix a vector-index increment in hashing strip.ss, 7.ss, newhash.ss, misc.ms +- fix c/version.h for FreeBDS (machine types i3fb, ti3fb, a6fb, ta6fb) + From f98a42fa1a8eb2b1a2f8eddce004433d812260f9 Mon Sep 17 00:00:00 2001 From: Andy Keep Date: Thu, 15 Jun 2017 23:33:01 -0400 Subject: [PATCH 5/5] fix reference to libc.so to be libc.so.7 for FreeBSD (machine types i3fb, ti3fb, a6fb, ta6fb) foreign.ms original commit: 1de3815f2c555622dccd390150c1fabeca981486 --- LOG | 5 ++++- mats/foreign.ms | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/LOG b/LOG index 14b638b2ee..a8f11a946a 100644 --- a/LOG +++ b/LOG @@ -514,4 +514,7 @@ - support Windows build on Bash/WSL BUILDING, configure, workarea, c/vs.bat (new), mats/vs.bat (new), c/Mf-*nt, mats/Mf-*, s/Mf-base -- fix c/version.h for FreeBDS (machine types i3fb, ti3fb, a6fb, ta6fb) \ No newline at end of file +- fix c/version.h for FreeBDS (machine types i3fb, ti3fb, a6fb, ta6fb) +- fix reference to libc.so to be libc.so.7 for FreeBSD (machine types + i3fb, ti3fb, a6fb, ta6fb) + foreign.ms diff --git a/mats/foreign.ms b/mats/foreign.ms index 09142fb2bd..c4f93fb672 100644 --- a/mats/foreign.ms +++ b/mats/foreign.ms @@ -176,7 +176,7 @@ (+ v ...))))))))) (machine-case - [(i3ob ti3ob a6ob ta6ob i3fb ti3fb a6fb ta6fb a6s2 ta6s2 i3s2 ti3s2 i3qnx ti3qnx) + [(i3ob ti3ob a6ob ta6ob a6s2 ta6s2 i3s2 ti3s2 i3qnx ti3qnx) (mat load-shared-object (file-exists? "foreign1.so") (begin (load-shared-object "./foreign1.so") #t) @@ -192,6 +192,14 @@ (error? (load-shared-object 3)) ) ] + [(i3fb ti3fb a6fb ta6fb) + (mat load-shared-object + (file-exists? "foreign1.so") + (begin (load-shared-object "./foreign1.so") #t) + (begin (load-shared-object "libc.so.7") #t) + (error? (load-shared-object 3)) + ) + ] [(i3nb ti3nb a6nb ta6nb) (mat load-shared-object (file-exists? "foreign1.so") @@ -2582,10 +2590,12 @@ (begin (define load-libc (machine-case - [(i3ob ti3ob a6ob ta6ob i3fb ti3fb a6fb ta6fb a6s2 ta6s2 i3s2 ti3s2 i3qnx ti3qnx i3nb ti3nb a6nb ta6nb) + [(i3ob ti3ob a6ob ta6ob a6s2 ta6s2 i3s2 ti3s2 i3qnx ti3qnx i3nb ti3nb a6nb ta6nb) '(load-shared-object "libc.so")] [(i3le ti3le a6le ta6le arm32le tarm32le ppc32le tppc32le) '(load-shared-object "libc.so.6")] + [(i3fb ti3fb a6fb ta6fb) + '(load-shared-object "libc.so.7")] [(i3nt ti3nt a6nt ta6nt) '(load-shared-object "msvcrt.dll")] [(i3osx ti3osx a6osx ta6osx)