-
Notifications
You must be signed in to change notification settings - Fork 122
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
Add support for Large Memory Model on AIX 32-bit #137
base: master
Are you sure you want to change the base?
Conversation
Do all linkers on 32-bit AIX support the -bmaxdata option? For example, I don't find it from GNU ld documentation. Maybe it needs to be handled conditionally.
gl_cv_host_cpu_c_abi_32bit comes from host-cpu-c-abi.m4. That file gets inserted to the xz package with gettext >= 0.20 which has picked it from Gnulib. If that is used, the macro gl_HOST_CPU_C_ABI_32BIT should be called explicitly to set gl_cv_host_cpu_c_abi_32bit, and the .m4 file likely should be committed to the repository as well, and then kept up to date. Specifically, it's not OK to rely on gettext's macros calling it as a future version of gettext isn't guaranteed to do so.
Maybe checking gl_cv_host_cpu_c_abi_32bit a good way to do this. However, I wonder if checking host_cpu would work too, or perhaps checking if ac_cv_sizeof_size_t equals 4. It is set by AC_CHECK_SIZEOF([size_t]) which is already in configure.ac.
CMake side should be changed to match but that should be easy enough. So let's worry about that once we know what to do.
I assume you have seen the AIX-specific notes in INSTALL. It only mentions the usage of CC=xlc_r. m4/ax_pthread.m4 attempts to autodetect it but it's not used in configure.ac because back in the day it seemed troublesome because CC is being modified by AC_PROG_CC_C99 and CC might contain also arguments, not just a command name. I don't know if that xlc_r note is still relevant; I haven't tested on AIX.
While I get that it can be nice if the address space setting was done by default, I also consider the alternative of adding a note to INSTALL and requiring people to set it manually. This is the first time I hear about this, so perhaps it's fairly common knowledge to set such LDFLAGS. I mean, I assume several other packages require adding the same LDFLAGS so doing so it might be a kind of standard thing to do. I'm just guessing now, trying to understand the big picture.
Thanks!
|
Hello Lasse, Yes, I saw the notes about AIX in the INSTALL file, but they apply to those who use the paid IBM xlc compiler and need to use the xlc_r binary for programs that make use of the pthreads library. My knowledge of autoconf is limited, but it seems to me that using sizeof is perfectly viable. if AIX and sizeof=4 and GCC and IBM ld Again, it would be great to see the old AIX supported out of the box, but the best course of action is up to your discretion. Sincerely, |
I'm curious, how old AIX and hardware is it that 64-bit binaries aren't possible (or practical)? PostgreSQL's platform-specific notes mention address space configuration on 32-bit AIX. Python mentions Maybe setting this option by default could make sense but it's also a topic that people building on AIX will encounter with other packages too. Thus, it's somewhat likely that people are (or will be) aware of this special case on 32-bit AIX. Special handling in one package (xz) might have unwanted effects when experienced packagers are used to setting the option themselves, although perhaps this isn't a very likely problem. This PR suggests using The docs say that values higher than 0xAFFFFFFF have a downside of not sharing memory of shared libraries. So perhaps 0xD0000000 isn't ideal here. I don't have much clue because I haven't used AIX. 0xAFFFFFFF would still be 2.75 GiB. It shouldn't be too hard to autodetect if the option is supported by just checking if linking works with those
Improvement ideas for the text are welcome. I suppose the main question is, what value to suggest by default. If you have a 400-megabyte file, compressing it with |
32-bit executables on AIX need to increase the address space to allow more than 256MB RAM.
It would be nice if this was available out of box.