Skip to content

net.mbedtls: disable AES-NI on OpenBSD with tcc - #24560

Merged
spytheman merged 1 commit into
vlang:masterfrom
lcheylus:mbedtls-openbsd
May 24, 2025
Merged

spytheman merged 1 commit into
vlang:masterfrom
lcheylus:mbedtls-openbsd

Conversation

@lcheylus

@lcheylus lcheylus commented May 23, 2025 •

Copy link
Copy Markdown
Contributor

Fix #22239


Tests OK on OpenBSD current/amd64 with tcc

  • Before fix
$ ./v -W test vlib/net/mbedtls/
---- Testing... ----------------------------------------------------------------------------------------------------------------------------
 FAIL  [1/2] C:  3117.7 ms, R:     0.000 ms vlib/net/mbedtls/mbedtls_compiles_test.v
>> compilation failed:
failed thirdparty object build cmd:
'/home/fox/dev/vlang.git/thirdparty/tcc/tcc.exe' -std=c99 -D_DEFAULT_SOURCE    -fPIC -I "/home/fox/dev/vlang.git/thirdparty/mbedtls/library" -I "/home/fox/dev/vlang.git/thirdparty/mbedtls/include" -I "/home/fox/dev/vlang.git/thirdparty/mbedtls/3rdparty/everest/include" -I "/home/fox/dev/vlang.git/thirdparty/mbedtls/3rdparty/everest/include/everest" -I "/home/fox/dev/vlang.git/thirdparty/mbedtls/3rdparty/everest/include/everest/kremlib" -o "/home/fox/.vmodules/.cache/25/2547d2ed0ebaaacbcc6a8a3f80176e27.module.net.mbedtls.o" -c "/home/fox/dev/vlang.git/thirdparty/mbedtls/library/aesni.c"
builder error: /home/fox/dev/vlang.git/thirdparty/mbedtls/library/aesni.c:131: error: invalid clobber register 'xmm0'


 FAIL  [2/2] C:  3277.9 ms, R:     0.000 ms vlib/net/mbedtls/mbedtls_sslconn_shutdown_does_not_panic_test.v
>> compilation failed:
failed thirdparty object build cmd:
'/home/fox/dev/vlang.git/thirdparty/tcc/tcc.exe' -std=c99 -D_DEFAULT_SOURCE    -fPIC -I "/home/fox/dev/vlang.git/thirdparty/mbedtls/library" -I "/home/fox/dev/vlang.git/thirdparty/mbedtls/include" -I "/home/fox/dev/vlang.git/thirdparty/mbedtls/3rdparty/everest/include" -I "/home/fox/dev/vlang.git/thirdparty/mbedtls/3rdparty/everest/include/everest" -I "/home/fox/dev/vlang.git/thirdparty/mbedtls/3rdparty/everest/include/everest/kremlib" -o "/home/fox/.vmodules/.cache/25/2547d2ed0ebaaacbcc6a8a3f80176e27.module.net.mbedtls.o" -c "/home/fox/dev/vlang.git/thirdparty/mbedtls/library/aesni.c"
builder error: /home/fox/dev/vlang.git/thirdparty/mbedtls/library/aesni.c:131: error: invalid clobber register 'xmm0'


--------------------------------------------------------------------------------------------------------------------------------------------
To reproduce just failure 1 run:    '/home/fox/dev/vlang.git/v' -W '/home/fox/dev/vlang.git/vlib/net/mbedtls/mbedtls_compiles_test.v'
To reproduce just failure 2 run:    '/home/fox/dev/vlang.git/v' -W '/home/fox/dev/vlang.git/vlib/net/mbedtls/mbedtls_sslconn_shutdown_does_not_panic_test.v'
Summary for all V _test.v files: 2 failed, 2 total. Elapsed time: 3359 ms, on 2 parallel jobs. Comptime: 6395 ms. Runtime: 0 ms.
  • With fix to disable AES-NI on OpenBSD with tcc
$ ./v -W test vlib/net/mbedtls/
---- Testing... ----------------------------------------------------------------------------------------------------------------------------
 OK    [1/2] C:  6009.2 ms, R:    67.343 ms vlib/net/mbedtls/mbedtls_compiles_test.v
 OK    [2/2] C:  6074.1 ms, R:    12.301 ms vlib/net/mbedtls/mbedtls_sslconn_shutdown_does_not_panic_test.v
--------------------------------------------------------------------------------------------------------------------------------------------
Summary for all V _test.v files: 2 passed, 2 total. Elapsed time: 6099 ms, on 2 parallel jobs. Comptime: 12083 ms. Runtime: 79 ms.

Signed-off-by: Laurent Cheylus <foxy@free.fr>
@huly-for-github

Copy link
Copy Markdown

Connected to Huly®: V_0.6-22926

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Excellent work.

@spytheman
spytheman merged commit 22c327f into vlang:master May 24, 2025
@lcheylus
lcheylus deleted the mbedtls-openbsd branch May 24, 2025 19:52
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.

Invalid clobber register xmm0 error with tcc on OpenBSD

2 participants