Skip to content

[SystemZ][z/OS] fix ppc-xmmintrin.c on z/OS #109676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 1, 2024
Merged

Conversation

zibi2
Copy link
Contributor

@zibi2 zibi2 commented Sep 23, 2024

This will fix the following failure seeing on z/OS:

In file included from clang/test/CodeGen/PowerPC/ppc-xmmintrin.c:31:
In file included from build/lib/clang/20/include/ppc_wrappers/xmmintrin.h:44:
In file included from build/lib/clang/20/include/altivec.h:48:
In file included from build/bin/../include/c++/v1/stddef.h:27:
In file included from build/bin/../include/c++/v1/__config:14:
In file included from build/bin/../include/c++/v1/__configuration/abi.h:15:
In file included from build/bin/../include/c++/v1/__configuration/platform.h:35:
/usr/include/features.h:1:20: error: expected unqualified-id
    1 |                    ??=if                       ??/
      |                    ^
/usr/include/features.h:2140:20: error: expected unqualified-id
 2140 |                    ??=endif /* __features_h */
      |                    ^

Adding -nostdlibinc will not use standard system include path and it will prevent above errors.

@zibi2 zibi2 requested review from nikic and abhina-sree September 23, 2024 15:26
@zibi2 zibi2 self-assigned this Sep 23, 2024
@llvmbot llvmbot added clang Clang issues not falling into any other category backend:PowerPC labels Sep 23, 2024
@llvmbot
Copy link
Member

llvmbot commented Sep 23, 2024

@llvm/pr-subscribers-backend-powerpc

@llvm/pr-subscribers-clang

Author: Zibi Sarbinowski (zibi2)

Changes

This will fix the following failure seeing on z/OS:

In file included from clang/test/CodeGen/PowerPC/ppc-xmmintrin.c:31:
In file included from build/lib/clang/20/include/ppc_wrappers/xmmintrin.h:44:
In file included from build/lib/clang/20/include/altivec.h:48:
In file included from build/bin/../include/c++/v1/stddef.h:27:
In file included from build/bin/../include/c++/v1/__config:14:
In file included from build/bin/../include/c++/v1/__configuration/abi.h:15:
In file included from build/bin/../include/c++/v1/__configuration/platform.h:35:
/usr/include/features.h:1:20: error: expected unqualified-id
    1 |                    ??=if                       ??/
      |                    ^
/usr/include/features.h:2140:20: error: expected unqualified-id
 2140 |                    ??=endif /* __features_h */
      |                    ^

Adding -nostdlibinc will not use standard system include path and it will prevent above errors.


Full diff: https://github.com/llvm/llvm-project/pull/109676.diff

1 Files Affected:

  • (modified) clang/test/CodeGen/PowerPC/ppc-xmmintrin.c (+1-1)
diff --git a/clang/test/CodeGen/PowerPC/ppc-xmmintrin.c b/clang/test/CodeGen/PowerPC/ppc-xmmintrin.c
index 4a15fa9f76ceea..8681bb3f9b4f8c 100644
--- a/clang/test/CodeGen/PowerPC/ppc-xmmintrin.c
+++ b/clang/test/CodeGen/PowerPC/ppc-xmmintrin.c
@@ -23,7 +23,7 @@
 
 // RUN: %clang -S -emit-llvm -target powerpc64-ibm-aix -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \
 // RUN:   -ffp-contract=off -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s --check-prefixes=CHECK,CHECK-BE
-// RUN: %clang -x c++ -fsyntax-only -target powerpc64-ibm-aix -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \
+// RUN: %clang -x c++ -fsyntax-only -target powerpc64-ibm-aix -mcpu=pwr8 -ffreestanding -nostdlibinc -DNO_WARN_X86_INTRINSICS %s \
 // RUN:   -fno-discard-value-names -mllvm -disable-llvm-optzns
 // RUN: %clang -S -emit-llvm -target powerpc64-ibm-aix -mcpu=pwr10 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \
 // RUN:   -ffp-contract=off -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s --check-prefixes=CHECK,CHECK-P10-BE

@nikic nikic requested review from AaronBallman and removed request for nikic September 23, 2024 15:31
Copy link
Contributor

@abhina-sree abhina-sree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zibi2 zibi2 merged commit 9ec229d into llvm:main Oct 1, 2024
11 checks passed
Sterling-Augustine pushed a commit to Sterling-Augustine/llvm-project that referenced this pull request Oct 3, 2024
This will fix the following failure seeing on z/OS:

```
In file included from clang/test/CodeGen/PowerPC/ppc-xmmintrin.c:31:
In file included from build/lib/clang/20/include/ppc_wrappers/xmmintrin.h:44:
In file included from build/lib/clang/20/include/altivec.h:48:
In file included from build/bin/../include/c++/v1/stddef.h:27:
In file included from build/bin/../include/c++/v1/__config:14:
In file included from build/bin/../include/c++/v1/__configuration/abi.h:15:
In file included from build/bin/../include/c++/v1/__configuration/platform.h:35:
/usr/include/features.h:1:20: error: expected unqualified-id
    1 |                    ??=if                       ??/
      |                    ^
/usr/include/features.h:2140:20: error: expected unqualified-id
 2140 |                    ??=endif /* __features_h */
      |                    ^
```
Adding `-nostdlibinc` will not use standard system include path and it
will prevent above errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:PowerPC clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants