I am trying to build the musl C library using a custom risc-v toolchain that uses GNU gcc version 8.1.0, GNU assembler version 2.34.
The error I get is the following:
home/guillermo/toolchain/as: invalid option -- 'p'
However, using the verbose flags for gcc and as the last call to the assembler is as follows (which includes NO such "--p" flag):
/home/guillermo/toolchain/as -v -I ./arch/riscv64 -I ./arch/generic -I obj/src/internal -I ./src/include -I ./src/internal -I obj/include -I ./include -I /home/guillermo/toolchain/library/common --traditional-format -fpic -march=rv64imafdc -mabi=lp64d --noexecstack -o obj/crt/Scrt1.o
The invocation of gcc before that was:
/home/guillermo/toolchain/riscv64-gcc -nostdinc -v -I ./arch/riscv64 -I ./arch/generic -I obj/src/internal -I ./src/include -I ./src/internal -I obj/include -I ./include -I /home/guillermo/toolchain/library/common -D _XOPEN_SOURCE=700 -D CRT crt/Scrt1.c -quiet -dumpbase Scrt1.c -march=rv64imafdc -mabi=lp64d -auxbase-strip obj/crt/Scrt1.o -g -Os -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -Wno-tautological-compare -Wall -std=c99 -version -ffreestanding -fexcess-precision=standard -frounding-math -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -fPIC -fno-stack-protector -o - |
Any help would be greatly appreciated as to what compiler flag could be causing "--p" to be passed to the assembler.