How to see which flags -march=native will activate?
You can use the -Q –help=target options: gcc -march=native -Q –help=target … The -v option may also be of use. You can see the documentation on the –help option here.
You can use the -Q –help=target options: gcc -march=native -Q –help=target … The -v option may also be of use. You can see the documentation on the –help option here.
You need to use objcopy to separate the debug information: objcopy –only-keep-debug “${tostripfile}” “${debugdir}/${debugfile}” strip –strip-debug –strip-unneeded “${tostripfile}” objcopy –add-gnu-debuglink=”${debugdir}/${debugfile}” “${tostripfile}” I use the bash script below to separate the debug information into files with a .debug extension in a .debug directory. This way I can tar the libraries and executables in one tar file … Read more
-w is the GCC-wide option to disable warning messages.
You should mention the library on the command line after the object files being compiled: gcc -Wstrict-prototypes -Wall -Wno-sign-compare -Wpointer-arith -Wdeclaration-after-statement -Wformat-security -Wswitch-enum -Wunused-parameter -Wstrict-aliasing -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers -Wno-override-init \ -g -O2 -export-dynamic -o utilities/ovs-dpctl utilities/ovs-dpctl.o \ lib/libopenvswitch.a \ /home/jyyoo/src/dpdk/build/lib/librte_eal.a /home/jyyoo/src/dpdk/build/lib/libethdev.a /home/jyyoo/src/dpdk/build/lib/librte_cmdline.a /home/jyyoo/src/dpdk/build/lib/librte_hash.a /home/jyyoo/src/dpdk/build/lib/librte_lpm.a /home/jyyoo/src/dpdk/build/lib/librte_mbuf.a /home/jyyoo/src/dpdk/build/lib/librte_ring.a /home/jyyoo/src/dpdk/build/lib/librte_mempool.a /home/jyyoo/src/dpdk/build/lib/librte_malloc.a \ -lrt -lm -lpthread … Read more
Yes, use -E -dM options instead of -c. Example (outputs them to stdout): echo | gcc -dM -E – echo | clang -dM -E – For C++ echo | g++ -dM -E -x c++ – echo | clang++ -dM -E -x c++ – From the gcc manual: Instead of the normal output, generate a list … Read more
The -Wl,xxx option for gcc passes a comma-separated list of tokens as a space-separated list of arguments to the linker. So gcc -Wl,aaa,bbb,ccc eventually becomes a linker call ld aaa bbb ccc In your case, you want to say “ld -rpath .“, so you pass this to gcc as -Wl,-rpath,. Alternatively, you can specify repeat … Read more
To invoke a dry run: make -n This will show what make is attempting to do.
That’s usually because you don’t have a file called vertex.cpp available to make. Check that: that file exists. you’re in the right directory when you make. Other than that, I’ve not much else to suggest. Perhaps you could give us a directory listing of that directory.
LLVM is a library that is used to construct, optimize and produce intermediate and/or binary machine code. LLVM can be used as a compiler framework, where you provide the “front end” (parser and lexer) and the “back end” (code that converts LLVM’s representation to actual machine code). LLVM can also act as a JIT compiler … Read more
(See the history on this answer to get the more elaborate text, but I now think it’s easier for the reader to see real command lines). Common files shared by all below commands $ cat a.cpp extern int a; int main() { return a; } $ cat b.cpp extern int b; int a = b; … Read more