-
Notifications
You must be signed in to change notification settings - Fork 174
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
multiarc/7z failed to build on ARM 32-bit #2494
Comments
Без diff --git a/CMakeLists.txt b/CMakeLists.txt
index 26e891a..9673ad5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -145,8 +145,8 @@ endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC -Wno-unused-function -D_FILE_OFFSET_BITS=64") # -fsanitize=address
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=c99 -fPIC -Wno-unused-function -D_FILE_OFFSET_BITS=64") # -fsanitize=address
-set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O2")
-set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O2")
+set(CMAKE_CXX_FLAGS_RELEASE "-O2")
+set(CMAKE_C_FLAGS_RELEASE "-O2")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(APP_DIR ${CMAKE_BINARY_DIR}/install)
diff --git a/multiarc/CMakeLists.txt b/multiarc/CMakeLists.txt
index ad85f5b..cc15955 100644
--- a/multiarc/CMakeLists.txt
+++ b/multiarc/CMakeLists.txt
@@ -180,6 +180,8 @@ else()
)
endif()
+string(REPLACE "-std=c99" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+
add_library (multiarc MODULE ${SOURCES})
target_compile_definitions(multiarc PRIVATE -D_7ZIP_ST -D_7ZIP_PPMD_SUPPPORT)
|
diff --git a/multiarc/src/formats/7z/C/SwapBytes.c b/multiarc/src/formats/7z/C/SwapBytes.c
index 9290592..123a64b 100644
--- a/multiarc/src/formats/7z/C/SwapBytes.c
+++ b/multiarc/src/formats/7z/C/SwapBytes.c
@@ -506,8 +506,8 @@ void Z7_FASTCALL
&& ( (defined(__GNUC__) && (__GNUC__ >= 4)) \
|| (defined(__clang__) && (__clang_major__ >= 4)))
- #define SWAP2_64_VAR(v) asm ("rev16 %x0,%x0" : "+r" (v));
- #define SWAP4_64_VAR(v) asm ("rev32 %x0,%x0" : "+r" (v));
+ #define SWAP2_64_VAR(v) __asm__ ("rev16 %x0,%x0" : "+r" (v));
+ #define SWAP4_64_VAR(v) __asm__ ("rev32 %x0,%x0" : "+r" (v));
#else // is not ARM64-GNU
@@ -593,9 +593,9 @@ SwapBytes4_64(CSwapUInt32 *items, const CSwapUInt32 *lim)
|| (defined(__clang__) && (__clang_major__ >= 4)))
#ifdef MY_CPU_64BIT
- #define SWAP2_32_VAR(v) asm ("rev16 %w0,%w0" : "+r" (v));
+ #define SWAP2_32_VAR(v) __asm__ ("rev16 %w0,%w0" : "+r" (v));
#else
- #define SWAP2_32_VAR(v) asm ("rev16 %0,%0" : "+r" (v)); // for clang/gcc
+ #define SWAP2_32_VAR(v) __asm__ ("rev16 %0,%0" : "+r" (v)); // for clang/gcc
// asm ("rev16 %r0,%r0" : "+r" (a)); // for gcc
#endif
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Details
https://launchpadlibrarian.net/757399390/buildlog_ubuntu-jammy-armhf.far2l_0+git20241103~ubuntu22.04.1_BUILDING.txt.gz
The text was updated successfully, but these errors were encountered: