Reply 40 of 66, by krcroft
- Rank
- Oldbie
Your notes were perfect; thanks Dominus.
DOSBox is now building clean using a pure-MacPorts suite with gcc-9. Here's a link to the full run:
https://github.com/dreamer/dosbox-staging/runs/277061295
MacPorts is installed from source, PATH prefixed with /opt/local/bin, and the following "*-mp-9" binaries used:
CC = gcc-mp-9
CXX = g++-mp-9
LD = gcc-mp-9
AR = ar
RANLIB = ranlib
CFLAGS = -Wall -pipe -fstack-protector -fdiagnostics-color=always -Ofast
CXXFLAGS = -Wall -pipe -fstack-protector -fdiagnostics-color=always -Ofast
$ gcc --version
gcc-mp-9 (MacPorts gcc9 9.2.0_1) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Snippet from configure:
checking if compiler supports -mno-ms-bitfields... yes
checking if compiler supports CoreMIDI headers... no
checking for ALSA CFLAGS...
checking for ALSA LDFLAGS... -lasound -lm -ldl -lpthread
After building we have a 3.7MB DOSBox binary that links to the following MacPorts libs (in addition to the usual Apple Framework libraries):
/opt/local/lib/libSDL-1.2.0.dylib (compatibility version 12.0.0, current version 12.4.0)
/opt/local/lib/libSDL_net-1.2.0.dylib (compatibility version 9.0.0, current version 9.0.0)
/opt/local/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)
/opt/local/lib/libgcc/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.27.0)
/opt/local/lib/libgcc/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
I tried to give apple-gcc40 and 42 a try, but they're no longer available on newer OS X releases:
"Error: apple-gcc42 is not supported on OS X versions newer than El Capitan."
As for the SDK - that's great you've got an older set of C-compliant headers that are still useable by your MacPorts gcc-4.2 version. (Hold onto that configuration.. too bad things degrade if you upgrade! 😒 )