compiler-flags

-fno-unwind-tables and -fno-asynchronous-unwind-tables does not work NDK clang++

生来就可爱ヽ(ⅴ<●) 提交于 2020-06-23 14:09:00
问题 I'm compiling my C++ code using clang++ that comes with ndk21. I've set both compiler flags -fno-unwind-tables and -fno-asynchronous-unwind-tables but the number of entries in the unwind table do not reduce. I also checked by setting the opposite -funwind-tables and -fasynchronous-unwind-tables but it doesn't increase either. setting -fno-exceptions does reduce the number of entries slightly which makes me think I'm passing the flags correctly. Does anyone have any idea why this could be the

-I Flag in GCC ( Linux )

孤街醉人 提交于 2020-02-27 07:39:33
问题 I Have found a source file bundle with a Makefile, I went through it, and In CFLAG Variable, There is a FLAG -I , I have searched on the web, But couldn't find what it actually does. Is it something relevent to the library files included in the C file? ( stdio.h,unistd.h, pthread.h ) Please point me to a source or explain in brief, What does the Flag -I does? -Regards 回答1: It's right there in the man page of gcc (called with man gcc on unix/linux or you can find it via Google): -I dir Add the

Make IDE-wide configuration changes in Eclipse

女生的网名这么多〃 提交于 2020-01-25 22:06:06
问题 I have been working on some GUI-related projects in Eclipse CDT. They always require me a specific command line pattern (Project > GCC C Linker) in order to load the libraries properly: I can't manage to keep that configuration for every project I start. Is there a way to achieve this? 回答1: IMHO it is not possible. See in Windows > Preferences > C/C++ Build > Setttings these options were not provided. So all these options are specific to a project. Means you can have different options for

Make IDE-wide configuration changes in Eclipse

感情迁移 提交于 2020-01-25 22:03:46
问题 I have been working on some GUI-related projects in Eclipse CDT. They always require me a specific command line pattern (Project > GCC C Linker) in order to load the libraries properly: I can't manage to keep that configuration for every project I start. Is there a way to achieve this? 回答1: IMHO it is not possible. See in Windows > Preferences > C/C++ Build > Setttings these options were not provided. So all these options are specific to a project. Means you can have different options for

Where is the complete documentation of clang flags?

岁酱吖の 提交于 2020-01-15 04:10:26
问题 The references I know are here: http://clang.llvm.org/docs/ClangCommandLineReference.html http://clang.llvm.org/docs/DiagnosticsReference.html but I can't find flags like -msse4.1,so are there complete list of supported flags on clang.llvm.org,or we need external documentation? 来源: https://stackoverflow.com/questions/55348280/where-is-the-complete-documentation-of-clang-flags

Is it possible to pass in command line variables to a bitbake build?

[亡魂溺海] 提交于 2020-01-12 06:38:54
问题 I have an OpenEmbedded environment using bitbake to do some builds. I wanted to get something "interactive" going on where bitbake would pause and ask for input then continue with the build but I've found out that's not possible. Since I can't do that I'm looking for some way to pass in extra flags for the build. Is there any way to pass in flags to a bitbake build sort of like gcc's -D option? ie: bitbake -Dfoo=bar oe-myimage Thus during the build process of oe-myimage the variable foo will

Disadvantages of using the `-Wextra` flag when compiling in GCC

我怕爱的太早我们不能终老 提交于 2020-01-02 01:56:49
问题 I know that one should always compile with both -Wall and -Wextra as they enable warnings and help us to understand our mistake, if any. I've read that the -Wextra compiler flag is not recommended to use because it is too verbose with a lot of false positives. I was quite surprised on reading this. So I started googling about it but I didn't get any answer as all the search results showed was "what does the -Wextra flag do?". So, my questions are In which all situations does the -Wextra flag

How to build nodejs C++ addon depending on a shared library with relative location

半城伤御伤魂 提交于 2020-01-01 18:17:55
问题 I'm trying to build a node.js C++ using node-gyp but can't figure out how to specify the -Wl,-rpath,$ORIGIN so that when loaded from node it could find shared object library that is in the same directory as addon.node . I have tried setting my binding.gyp like this: "libraries": [ "-L../../install_release_x64/", "-llibppp" ], "ldflags": [ "-Wl,-rpath,'$ORIGIN'" ], "cflags_cc": [ "-fexceptions", "-fPIC", "-Wno-unknown-pragmas" ] but when I run $ readelf -d addon.node the result is like this:

How to build nodejs C++ addon depending on a shared library with relative location

假如想象 提交于 2020-01-01 18:17:48
问题 I'm trying to build a node.js C++ using node-gyp but can't figure out how to specify the -Wl,-rpath,$ORIGIN so that when loaded from node it could find shared object library that is in the same directory as addon.node . I have tried setting my binding.gyp like this: "libraries": [ "-L../../install_release_x64/", "-llibppp" ], "ldflags": [ "-Wl,-rpath,'$ORIGIN'" ], "cflags_cc": [ "-fexceptions", "-fPIC", "-Wno-unknown-pragmas" ] but when I run $ readelf -d addon.node the result is like this:

How can I view assembly code produced for C functions? [duplicate]

我是研究僧i 提交于 2020-01-01 05:32:29
问题 This question already has answers here : How do you get assembler output from C/C++ source in gcc? (17 answers) Closed 10 months ago . I need to view the assembly code produced for certain C functions. What flags should I use when compiling the C code using the g++ compiler? 回答1: You may add the -S tag to see the assembly code. Like for a file TEST.c , with gcc , do, gcc TEST.c -S clang also outputs the assembly code with a similar -S tag. After that just look for a file with a .S extension.