Skip to content

[stdlib] Added PowerPC 32-bit support #41656

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
Mar 7, 2022

Conversation

colemancda
Copy link
Contributor

Added patches to cross compile the Swift stdlib for the PowerPC 32-bit architecture.

@ghost
Copy link

ghost commented Mar 4, 2022

Genius, I like your pull request,fantastic

@CodaFi
Copy link
Contributor

CodaFi commented Mar 4, 2022

Compiler changes LGTM.

Would like stdlib’s eyes on this for the rest.

@swift-ci test

@CodaFi
Copy link
Contributor

CodaFi commented Mar 4, 2022

You may want to update the Swift driver here https://github.com/apple/swift-driver/blob/0f9f247c8cc3d225dbbc263b1ec082bf2c8675fe/Sources/SwiftDriver/Jobs/GenericUnixToolchain%2BLinkerSupport.swift

we should already accept the ppc triple family.

@finagolfin
Copy link
Member

Heh, nice, are you actually building the Swift compiler for 32-bit PowerPC too? If so, not hitting this C++ static assert that I hit with Android armv7 a couple months ago?

@colemancda
Copy link
Contributor Author

@buttaface No, I compile a patched Swift 5.5.3 compiler for Aarch64 (Debian on M1 Pro) and cross compile the stdlib using cmake and buildroot. I am building a qemu mac99 image right now. This is also the strategy I used to cross compile Swift 5.5.3 for Armv7. Only 1 patch was needed provided by @uraimo to fix weak references.

@colemancda
Copy link
Contributor Author

I have had to make changes to LLVM that I will be submitting. Mainly in TargetInfo.cpp.

@colemancda
Copy link
Contributor Author

Right now I am getting this error:

In file included from ../stdlib/public/runtime/Casting.cpp:18:
In file included from ../include/swift/Runtime/Casting.h:20:
In file included from ../include/swift/Runtime/Metadata.h:20:
../include/swift/ABI/Metadata.h:777:50: error: 'swift_context' parameter can only be used with swiftcall or swiftasynccall calling convention
  SWIFT_CC(swift) void(SWIFT_CONTEXT HeapObject *);

@colemancda
Copy link
Contributor Author

LLVM patches
swiftlang/llvm-project#4022

@CodaFi
Copy link
Contributor

CodaFi commented Mar 7, 2022

@swift-ci test

@CodaFi CodaFi merged commit 7cd3541 into swiftlang:main Mar 7, 2022
@colemancda colemancda deleted the feature/ppc32 branch March 13, 2022 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants