Skip to content
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

Inconsistent (system-type 'arch) on BC x86_64 FreeBSD? #4691

Closed
LiberalArtist opened this issue Jul 3, 2023 · 2 comments
Closed

Inconsistent (system-type 'arch) on BC x86_64 FreeBSD? #4691

LiberalArtist opened this issue Jul 3, 2023 · 2 comments
Labels
platform:bsd BSD specific topics

Comments

@LiberalArtist
Copy link
Contributor

This is Racket BC's definition for SCHEME_ARCH on FreeBSD:

# define SCHEME_OS "freebsd"
# if defined(__i386__)
# define SCHEME_ARCH "i386"
# define REGISTER_POOR_MACHINE
# define MZ_USE_JIT_I386
# define MZ_TRY_EXTFLONUMS
# if defined(__FreeBSD_kernel__)
# define ASM_DBLPREC_CONTROL_87
# else
# define FREEBSD_CONTROL_387
# endif
# elif defined(__amd64__)
# define SCHEME_ARCH "amd64"

It appears to be the only circumstance when amd64 is used instead of x86_64 for (system-type 'arch) and (system-library-subpath). In particular, Racket CS uses x86_64 on ta6fb:
(define arch-symbol
(case (reflect-machine-type)
[(a6osx ta6osx
a6nt ta6nt
a6le ta6le
a6ob ta6ob
a6nb ta6nb
a6fb ta6fb
a6s2 ta6s2)
'x86_64]

I think the BC definition should probably changed, but I'm not a BSD user myself.

@LiberalArtist
Copy link
Contributor Author

I just came across this in the docs, which, while it doesn't strictly promise not to return 'amd64, does give a stronger implication to expect 'x86_64 than I'd realized:

In @indexed-racket['arch] mode, the result is a symbol representing an
architecture. Possible results include @racket['x86_64], @racket['i386],
@racket['aarch64], @racket['arm] (32-bit), and @racket['ppc] (32-bit).

@mflatt
Copy link
Member

mflatt commented Jul 3, 2023

I agree that it should be x86_64.

@mflatt mflatt closed this as completed in 365b92f Jul 4, 2023
@shhyou shhyou added the platform:bsd BSD specific topics label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:bsd BSD specific topics
Projects
None yet
Development

No branches or pull requests

3 participants