Page MenuHomePhabricator

[Driver] Add iSOFTLinux to GNU ToolChains X86Triple

Authored by xiangzhai on Apr 19 2017, 10:01 PM.



Hi LLVM developers,

I am a Linux engineer of operating system department at iSOFT, I want to add iSOFTLinux to GNU ToolChains X86Triple, please review my patch, thanks a lot!

Leslie Zhai

Diff Detail


Event Timeline

xiangzhai created this revision.Apr 19 2017, 10:01 PM
rsmith edited edge metadata.Apr 20 2017, 4:28 PM

Please add some test coverage for these triples.

xiangzhai updated this revision to Diff 96088.EditedApr 20 2017, 8:32 PM

Hi Richard,

Thanks for your review!

I updated my patch as you suggested: add some test coverage for these triples, and I run make check-clang-driver for verification, please point out my fault, thanks!

PS: my build option like this:

cmake .. -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_C_COMPILER=clang \
    -DCMAKE_CXX_COMPILER=clang++ \
    -DCMAKE_CXX_FLAGS="-std=c++11 -fPIC" \
    -DFFI_INCLUDE_DIR=$(pkg-config --variable=includedir libffi) \
    -DFFI_LIBRARY_DIR:PATH="$(pkg-config --variable=libdir libffi)" \
    -DLLVM_BINUTILS_INCDIR=/usr/include \
    -DLLVM_DEFAULT_TARGET_TRIPLE="x86_64-isoft-linux" \

Leslie Zhai

compnerd requested changes to this revision.Apr 24 2017, 5:40 PM

Is this to actually get the correct GCC search dir? Your test doesnt really test anything AFAICT, as it is just invoking clang with a target that it would accept anyways.

This revision now requires changes to proceed.Apr 24 2017, 5:40 PM

Hi Saleem,

Thanks for pointing out my fault, I will update my patch to add, for example:


to the testcase.

Leslie Zhai

xiangzhai updated this revision to Diff 96497.Apr 24 2017, 9:54 PM
xiangzhai edited edge metadata.

Hi Saleem,

Please check whether or not "the correct GCC search dir" for x86_64-isoft-linux firstly, please point out my fault, thanks!

And sysroot structure shown as:

$ tree clang/test/Driver/Inputs/isoft_linux_4_tree

├── lib
└── usr
    ├── lib
    │   └── gcc
    │       └── x86_64-isoft-linux
    │           └── 6.3.0
    │               ├── crtbegin.o
    │               ├── crtbeginT.o
    │               └── crtfastmath.o
    └── x86_64-isoft-linux
        └── lib

Leslie Zhai

compnerd added inline comments.Jun 1 2017, 7:58 PM

These only invoke clang, but don't actually test anything.

xiangzhai abandoned this revision.Sep 27 2017, 12:21 AM