SDL-Hercules-390 / hyperion

The SDL Hercules 4.x Hyperion version of the System/370, ESA/390, and z/Architecture Emulator
Other
245 stars 92 forks source link

using the macro BUILD_APPLE_M1 set by configure prevents a universal build #617

Closed atncsj6h closed 4 weeks ago

atncsj6h commented 9 months ago

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

wrljet commented 9 months ago

Good idea.

Fish-Git commented 9 months ago

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?)

wrljet commented 9 months ago

Fish,

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

Bill

Fish-Git commented 9 months ago

Thanks!

wrljet commented 9 months ago

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

atncsj6h commented 9 months ago

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

Fish-Git commented 9 months ago

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!

wrljet commented 9 months ago

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

Fish-Git commented 9 months ago

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 commented 8 months ago

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.

atncsj6h commented 8 months ago

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

Fish-Git commented 8 months ago

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.

atncsj6h commented 8 months ago

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

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

Fish-Git commented 6 months ago

(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.

wrljet commented 6 months ago

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

Fish-Git commented 6 months ago

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 commented 5 months ago

(PING!)

Status?

Fish-Git commented 3 months ago

(PING!?!)

Status?!?

Fish-Git commented 2 months ago

@wrljet ? Are you still alive? Haven't heard from you in a while! Just wondering what the status of this issue is. Should it maybe be changed to "OnGoing" ("Issue is long-term. Variant of IN PROGRESS: it's being worked on but maybe not at this exact moment.")? Thanks.

Fish-Git commented 4 weeks ago

I'm presuming Enrico's recent message to the Hercules group (https://hercules-390.groups.io/g/group/message/8991) now means this issue has now been resolved(?), so am closing it.

Feel free to re-open it again if this is not the case.

wrljet commented 4 weeks ago

I think Enrico's message was just an announcement. Likely he had updated his macOS.

(FWIW, Hercules-Helper has had support for that latest macOS since it first appeared in beta testing)

Nothing's changed that would be related to this issue, that I'm aware of.