-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Support building on AIX 7.2 with Clang #13397
base: main
Are you sure you want to change the base?
Conversation
Current test status on AIX 7.2: 98% tests passed, 302 tests failed out of 12159 |
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.
I think we also need `(OS_AIX) here: https://github.com/facebook/rocksdb/blob/main/env/io_posix.cc#L31
port/port_posix.h
Outdated
@@ -43,7 +43,7 @@ | |||
#include <sys/types.h> | |||
#define PLATFORM_IS_LITTLE_ENDIAN (BYTE_ORDER == LITTLE_ENDIAN) | |||
#include <alloca.h> | |||
#elif defined(OS_FREEBSD) || defined(OS_OPENBSD) || defined(OS_NETBSD) || \ | |||
#elif defined(OS_AIX) || defined(OS_FREEBSD) || defined(OS_OPENBSD) || defined(OS_NETBSD) || \ | |||
defined(OS_DRAGONFLYBSD) || defined(OS_ANDROID) | |||
#include <sys/endian.h> |
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.
I don't think we have sys/endian.h
on AIX. You can use sys/machine.h
for the ENDIAN macros.
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.
Good call, added now
@@ -58,7 +58,7 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. | |||
#include <stdint.h> | |||
#include <sys/time.h> | |||
#include <time.h> | |||
#if defined(__powerpc__) | |||
#if !defined(OS_AIX) && defined(__powerpc__) |
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.
Do we need defined(__powerpc__)
?
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.
This is for Linux on power that does have the header
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.
Oh right, I misread the code changes. Thought you had:
#if defined(__powerpc__)
#if !defined(OS_AIX) && defined(__powerpc__)
What you have looks good.
I don't think we uses any of the headers directly. Added just in case
|
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.
AIX changes look good to me.
I don't have the ability to approve but LGTM.
@@ -58,7 +58,7 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. | |||
#include <stdint.h> | |||
#include <sys/time.h> | |||
#include <time.h> | |||
#if defined(__powerpc__) | |||
#if !defined(OS_AIX) && defined(__powerpc__) |
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.
Oh right, I misread the code changes. Thought you had:
#if defined(__powerpc__)
#if !defined(OS_AIX) && defined(__powerpc__)
What you have looks good.
#elif defined(OS_AIX) | ||
return __builtin_ppc_get_timebase(); | ||
#elif defined(__powerpc__) | ||
return __ppc_get_timebase(); |
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.
#elif defined(OS_AIX) | |
return __builtin_ppc_get_timebase(); | |
#elif defined(__powerpc__) | |
return __ppc_get_timebase(); | |
#elif defined(__powerpc__) | |
#if defined(OS_AIX) | |
return __builtin_ppc_get_timebase(); | |
#else | |
return __ppc_get_timebase(); | |
#endif |
Nit: personal preference to keep the Power targets together.
This patch supports basic operations needed for building RocksDB on AIX 7.2 with Clang or IBM OpenXL C/C++ for AIX
Changes
-mcmodel=large
as globals exceeds small table of content.env/fs_posix.cc
,port/port_posix.h
, andtoku_time.h
.