Skip to content

Conversation

CL-Jeremy
Copy link
Contributor

Description

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS 10.15.7 19H2026 x86_64
Command Line Tools 12.4.0.0.1.1610135815

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • referenced existing tickets on Trac with full URL in commit message?
  • checked your Portfile with port lint?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?
  • checked that the Portfile's most important variants haven't been broken?

@macportsbot
Copy link

Notifying maintainers:
@barracuda156 for port picotls.

@CL-Jeremy
Copy link
Contributor Author

Uhh, it seems the fusion backend detects AES-NI capabilities on build. I should probably turn this on with a build flag for x86-64 and off for ARM64?

@barracuda156
Copy link
Contributor

Should definitely be off for powerpc.

Copy link
Contributor

@barracuda156 barracuda156 left a comment

Choose a reason for hiding this comment

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

Fusion should either be fixed for all archs or handled conditionally.

Update. It uses Intel intrinsics, so won’t be fixable.

copy ${worksrcpath}/include/picotls ${destroot}${prefix}/include
copy ${worksrcpath}/include/picotls.h ${destroot}${prefix}/include
foreach lib {libpicotls-core.a libpicotls-mbedtls.a libpicotls-minicrypto.a libpicotls-openssl.a} {
foreach lib {libpicotls-core.a libpicotls-fusion.a libpicotls-minicrypto.a libpicotls-openssl.a} {
Copy link
Contributor

Choose a reason for hiding this comment

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

This does not work, libpicotls-fusion.a is not built on powerpc (or with gcc).

HTTP/1, HTTP/2 and HTTP/3 over QUIC.

set with_fusion OFF
if {${build_arch} in [list i386 x86_64]} {
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for nitpicking, but configure.build_arch should rather be used, IMO, here (though it makes difference only for edge cases).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting... I'm actually thinking of +universal, does this count as an edge case? What's the semantic difference between the two? I just took this from random ports I found. I thought configure.* would make sense in the configure phase, probably I should also move the block?

Copy link
Contributor

Choose a reason for hiding this comment

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

AFAIK, build_arch is a single primary arch in macports.conf. For example, I may have x86_64 there, but build a given port for ppc, or reverse (assuming 10.6.8 on a physical Intel machine). configure.build_arch is what I am actually building for. I am not an expert with universal builds, since they are largely broken for my cases of interest.

# FIXME: fails to build with clang on 10.6–10.7:
# error: call to undeclared library function 'aligned_alloc'
# https://github.com/h2o/picotls/issues/514
*gcc-3.* *gcc-4.* {clang < 800}
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure gcc-3.x is a concern anymore, but this can be written shorter as {*gcc-[34].*}.

Copy link
Contributor

@barracuda156 barracuda156 left a comment

Choose a reason for hiding this comment

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

The build works fine now.

barracuda156 added a commit to macos-powerpc/powerpc-ports that referenced this pull request Sep 18, 2025
@barracuda156
Copy link
Contributor

@reneeotten This should be good to merge (with squashing commits).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants