PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0
Showing posts with label riscv. Show all posts
Showing posts with label riscv. Show all posts

Sunday, June 26, 2022

[FIXED] How to determine which compiler flag/option causes "--p" to be passed to assembler?

 June 26, 2022     compiler-errors, gcc, gnu-assembler, musl, riscv     No comments   

Issue

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.


Solution

-fpic is an option for the compiler in particular. It has no special meaning to the assembler, which treats it the same as -f -p -i -c.



Answered By - Joseph Sible-Reinstate Monica
Answer Checked By - Timothy Miller (PHPFixing Admin)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Older Posts Home
View mobile version

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments

Copyright © PHPFixing