hyperion icon indicating copy to clipboard operation
hyperion copied to clipboard

using the macro BUILD_APPLE_M1 set by configure prevents a universal build

Open atncsj6h opened this issue 1 year ago • 19 comments

the title tells

no need to bother configure.ac for this checks the builtin compiler macros should be used

generic

# if defined( __APPLE__ ) 
# endif

will use the qos constructs also for x86_64 processors I do not know what happens under the covers but an arm64 universal works on a macbook Intel

more granularity / pickyness

# if defined( __APPLE__ ) && defined( __arm64 )
# endif

the compiler will use the qos contructs for arm the old constructs for x86_64

e

P.S.

cc -E -dM - </dev/null |sort > compiler_macros.h

should always be run when updating the compiler to find the new macros available

atncsj6h avatar Jan 25 '24 11:01 atncsj6h

Good idea.

wrljet avatar Jan 25 '24 14:01 wrljet

I'm afraid I do not understand the problem you are reporting, nor what your suggested fix for the problem is, Enrico. "the title tells" is not enough for me. I am not familiar with Apple "Universal" builds.

Do you have a patch for us?

(Bill? Do you understand what Enrico is saying?)

Fish-Git avatar Jan 25 '24 15:01 Fish-Git

Fish,

Yes, I understand. Enrico and I will take care of it.

Bill

wrljet avatar Jan 25 '24 15:01 wrljet

Thanks!

Fish-Git avatar Jan 25 '24 15:01 Fish-Git

This will be an improvement going forward, but nothing urgent.

wrljet avatar Jan 25 '24 15:01 wrljet

when building a universal binary the apple compiler will logically run twice one time with the __arm64 macro, and one time with the __amd64/__x86_64 macros and it will take two different paths, using the BUILD_APPLE_M1 it will take always the same path and it will not distinguish between the two architectures e

PS since it looks like I am the only one building universal binaries , you just can wait until I check everything again and I can post the final global solution

atncsj6h avatar Jan 25 '24 15:01 atncsj6h

when building a universal binary the apple compiler will logically run twice one time with the __arm64 macro, and one time with the __amd64/__x86_64 macros and it will take two different paths, using the BUILD_APPLE_M1 it will take always the same path and it will not distinguish between the two architectures

Ah! Okay! That makes sense now. I think I now know what your GitHub Issue is referring to. Thanks, Enrico!

PS since it looks like I am the only one building universal binaries , you just can wait until I check everything again and I can post the final global solution

Thank you. We would appreciate that very much!

Fish-Git avatar Jan 25 '24 18:01 Fish-Git

You can blame me for how it is now.

When I arrived here SDL Hercules didn't build at all on quite a few platforms, including modern Mac.

What we have now is the result of me buying a Mac M1 at Costco and just dicking with it. Never touched anything Apple before that.

Bill

wrljet avatar Jan 25 '24 21:01 wrljet

What we have now is the result of me buying a Mac M1 at Costco and just dicking with it.

Lucky you! I wish I could afford one.

Never touched anything Apple before that.

I was a huge fan of the Macintosh when it originally came out oh so many years ago. Bought myself a "Fat" Mac (512K!) with a dot matrix printer and installed a 3rd party internal (10MB!) hard drive! I was in heaven!   :)

Sadly, I had to sell it a few years later for the money.   :(

And of course today, I'm so dirt poor I couldn't get out of sight if it cost a quarter (25 cents) to go around the world!   :`(

Fish-Git avatar Jan 27 '24 07:01 Fish-Git

Bill Lewis (@wrljet) wrote:

Yes, I understand. Enrico and I will take care of it.

Enrico Sorichetti (@atncsj6h) wrote:

since it looks like I am the only one building universal binaries , you just can wait until I check everything again and I can post the final global solution

(Ping!)  How's is going, guys?  Still no rush. Just curious is all.

Fish-Git avatar Feb 13 '24 22:02 Fish-Git

I had some personal urgencies to take care of, so I could not dedicate any time to the IT hobby ( apart lurking ) I' ll be back soon

here the git diff output at the current hyperion level just the .c .h sources the config things can be cleaned up later - no hurry gmake check runs with no errors on apple Mx processor

atncsj6h avatar Feb 14 '24 10:02 atncsj6h

I had some personal urgencies to take care of, so I could not dedicate any time to the IT hobby ( apart lurking ) I' ll be back soon

My best wishes and thoughts go out to you my friend!

here the git diff output at the current hyperion level just the .c .h sources the config things can be cleaned up later - no hurry gmake check runs with no errors on apple Mx processor

Thanks! I'll take a peek at them and then probably go ahead and commit them if they look okay (which I'm sure they will).

Good luck with your personal urgency! I wish you nothing but the best, and hope things go well for you. Take care, my friend.

Fish-Git avatar Feb 16 '24 05:02 Fish-Git

My best wishes and thoughts go out to you my friend!

thank you, nothing to worry about, just some very annoying house administrative stuff

atncsj6h avatar Feb 16 '24 07:02 atncsj6h

(PING!)

How's it going you two? Is this issue resolved yet? Any progress? are you still working on it? Or can it be closed?

Just interested in a status update, that's all. If I should leave it open, fine. Just let me know. Thanks.

Fish-Git avatar Apr 06 '24 03:04 Fish-Git

Please don't close. Still needs to be addressed. Just lot of other stuff going on.

wrljet avatar Apr 06 '24 16:04 wrljet

No problem. I was just under the impression that it was a fairly simple and straightforward thing, that's all. Sorry to bother you. Will keep open as long as needed.

Fish-Git avatar Apr 06 '24 18:04 Fish-Git

(PING!)

Status?

Fish-Git avatar May 04 '24 18:05 Fish-Git

(PING!?!)

Status?!?

Fish-Git avatar Jul 23 '24 19:07 Fish-Git