-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc] Fix accidental LIBC_NAMESPACE_syscall definition #69548
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
Conversation
I think these are also accidental |
@llvm/pr-subscribers-libc Author: None (alfredfo) ChangesBuilding helloworld.c currently errors with "undefined symbol: __llvm_libc_syscall" See: #67032 @gchatelet Full diff: https://github.com/llvm/llvm-project/pull/69548.diff 4 Files Affected:
diff --git a/libc/src/unistd/linux/syscall.cpp b/libc/src/unistd/linux/syscall.cpp
index e1b13c9c143fa41..e0070fe6d805e3e 100644
--- a/libc/src/unistd/linux/syscall.cpp
+++ b/libc/src/unistd/linux/syscall.cpp
@@ -16,7 +16,7 @@
namespace LIBC_NAMESPACE {
-LLVM_LIBC_FUNCTION(long, LIBC_NAMESPACE_syscall,
+LLVM_LIBC_FUNCTION(long, __llvm_libc_syscall,
(long number, long arg1, long arg2, long arg3, long arg4,
long arg5, long arg6)) {
long ret = LIBC_NAMESPACE::syscall_impl<long>(number, arg1, arg2, arg3, arg4,
diff --git a/libc/src/unistd/syscall.h b/libc/src/unistd/syscall.h
index 255459cadb8b714..a3a4b2cb0a7b3b5 100644
--- a/libc/src/unistd/syscall.h
+++ b/libc/src/unistd/syscall.h
@@ -14,7 +14,7 @@
namespace LIBC_NAMESPACE {
-long LIBC_NAMESPACE_syscall(long number, long arg1, long arg2, long arg3,
+long __llvm_libc_syscall(long number, long arg1, long arg2, long arg3,
long arg4, long arg5, long arg6);
} // namespace LIBC_NAMESPACE
diff --git a/libc/test/src/unistd/CMakeLists.txt b/libc/test/src/unistd/CMakeLists.txt
index f2e2293e026f2ff..2fb11fed92b310f 100644
--- a/libc/test/src/unistd/CMakeLists.txt
+++ b/libc/test/src/unistd/CMakeLists.txt
@@ -414,7 +414,7 @@ add_libc_unittest(
libc.include.unistd
libc.include.fcntl
libc.include.sys_syscall
- libc.src.unistd.LIBC_NAMESPACE_syscall
+ libc.src.unistd.__llvm_libc_syscall
libc.test.errno_setter_matcher
)
diff --git a/libc/test/src/unistd/syscall_test.cpp b/libc/test/src/unistd/syscall_test.cpp
index 4a53f674b8f3d61..211b27c3188c4d8 100644
--- a/libc/test/src/unistd/syscall_test.cpp
+++ b/libc/test/src/unistd/syscall_test.cpp
@@ -24,7 +24,7 @@ using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
// There is no function named "syscall" in llvm-libc, we instead use a macro to
// set up the arguments properly. We still need to specify the namespace though
// because the macro generates a call to the actual internal function
-// (LIBC_NAMESPACE_syscall) which is inside the namespace.
+// (__llvm_libc_syscall) which is inside the namespace.
TEST(LlvmLibcSyscallTest, TrivialCall) {
libc_errno = 0;
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Collateral damage from someone doing find . -type f -exec sed -i 's/namespace __llvm_libc/namespace LIBC_NAMESPACE/g' {} \;
presumably.
✅ With the latest revision this PR passed the C/C++ code formatter. |
2bcf846
to
133b12a
Compare
Building helloworld.c currently errors with "undefined symbol: __llvm_libc_syscall" See: llvm#67032
133b12a
to
5596ad4
Compare
Doh! Thx for the fix!. Can you also fix the ones in #69548 (comment)? |
Sure, I'll fix it today once I'm on my desktop @gchatelet |
Local branch amd-gfx 85fdb03 Manually merged main:416884544e02 into amd-gfx:39064028b3b3 Remote branch main d404130 [libc] Fix accidental LIBC_NAMESPACE_syscall definition (llvm#69548)
…SPACE_clock_freq (#69620) See-also: llvm/llvm-project#69548 GitOrigin-RevId: 2a373783910c8f0d858b1cf468f8ed525c6bfa8a Original-Revision: 556c8394c08f0e457c4bb75b39f8d99ccb36853b Roller-URL: https://ci.chromium.org/b/8766780425999225777 CQ-Do-Not-Cancel-Tryjobs: true Change-Id: I53f56ad90159325b88c609184ff5bbf7546fea2a Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/934792
Building helloworld.c currently errors with "undefined symbol: __llvm_libc_syscall"
See: #67032
@gchatelet