Was building a cross compiler from C to the i686 processor with the elf file structure. When I ran configure for binutils, it ran until creating config.status and gave the error:
configure: creating ./config.status
./config.status: line 470: syntax error near unexpected token `)'
./config.status: line 470: ` *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;'[
for reference, I am on MacOS 10.14.6, building binutils-2.37, and I am following the OSDev GCC Cross-Compiler Tutorial. These are the configure options I used:
toolchain/i686-elf-source/binutils-2.37/configure --target=i686-elf --prefix="toolchain/i686-elf-build" --with-sysroot --disable-nls --disable-werror
(Note that pwd=toolchain/i686-elf-build/binutils-build
)
The expected result looks like this:
configure: creating ./config.status
config.status: creating makefile
The syntax error was oddly specific, and I could not find any similar syntax errors while searching. I had previously tried a different prefix, but it still didn't work. I am still a beginner in bash, so I couldn't find what the core of the error was in config.status, and I am still trying to find similar issues.
I would definitely appreciate help. Thanks!