如何解决与clang相关的gcc或g ++错误?

时间:2019-07-15 06:34:15

标签: android gcc linux-kernel kernel

在我的android内核中进行了一些更改,并试图对其进行编译,但是遇到了一些与clang相关的错误。

我尝试操纵clang和gcc标志,但不知道应该添加或删除哪个。

extern "C"
{

int init_test()
{
    int n=5,i;
    TestClass **t;

    t = new TestClass* [n];
    for(i=0; i<n; i++) {
       t[i] = new TestClass(i);
       t[i]->print_version();
    }

    for(i=0; i<n; i++)
        delete t[i];
    delete t;
    return 0;
}

输出:

  CC      kernel/test.o
real-aarch64-linux-android-g++: error: unrecognized command line option '-no-integrated-as'
real-aarch64-linux-android-g++: error: unrecognized command line option '-mno-implicit-float'
real-aarch64-linux-android-g++: error: unrecognized command line option '-mno-global-merge'
real-aarch64-linux-android-g++: error: unrecognized command line option '-no-integrated-as'
real-aarch64-linux-android-g++: error: unrecognized command line option '-Qunused-arguments'
make[3]: *** [/home/saurabh/walleye_test/private/msm-google/scripts/Makefile.build:333: kernel/test.o] Error 1
make[2]: *** [/home/saurabh/walleye_test/private/msm-google/Makefile:1100: kernel] Error 2

0 个答案:

没有答案