Skip to content
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 for xlc and bytecode shared libs on AIX. #1130

Merged
merged 2 commits into from
Apr 7, 2017

Conversation

bobzhang
Copy link
Member

This patch made by KONSTANTIN ROMANOV adds support for xlc (IBM C compiler, used on
Linux and AIX) in cckind.cc and enables shared libraries
support in bytecode compiled programs on AIX.

It was tested on Linux/gcc and AIX7.1/xlc 12. By default
configure script uses gcc compiler, so there should be no
impact on Linux/xlc systems. To use xlc one should run
configure with -cc xlc.

This patch adds support for xlc (IBM C compiler, used on
Linux and AIX) in cckind.cc and enables shared libraries
support in bytecode compiled programs on AIX.

It was tested on Linux/gcc and AIX7.1/xlc 12. By default
configure script uses gcc compiler, so there should be no
impact on Linux/xlc systems. To use xlc one should run
configure with -cc xlc.
@gasche
Copy link
Member

gasche commented Mar 31, 2017

This seems clearly non-invasive for other architectures, so I would be in favor of merging.

@gasche
Copy link
Member

gasche commented Mar 31, 2017

Could you maybe add a Changes entry? People may be interested in knowing that this usage mode is now known to work.

@shindere
Copy link
Contributor

shindere commented Mar 31, 2017 via email

@ksromanov
Copy link
Contributor

Is it on purpose that the macros tested by the first line are different
from those actually used on the second line?

Not on purpose. Actually check for __xlC__ can be removed. Also, there will be no harm, if __xlC_ver__ is not defined - it is not used in configure for making decisions, only for information.

Would you be able to modify the patch so that warnings get enabled on
developemnt versions as is done for gcc?

  1. According to XL C Reference, there is -qflag, which controls the level of messages. By default is set to maximal verbosity - http://www-01.ibm.com/support/docview.wss?uid=swg27024742&aid=1 . I don't see anything useful while compiling current trunk. :-(

Unfortunately, XL C is very rare, it does not produce more meaningful warnings than gcc. Moreover, there is a effort to change XL C frontend to clang.

  1. We can not enable -Werror for XL C, because it is very likely that it compilation will just stop on a harmless warning.

Our experience working with this compiler tells that we should not expect useful warnings from XL C, if we already fixed all gcc warnings. :-(

@shindere
Copy link
Contributor

shindere commented Mar 31, 2017 via email

@ksromanov
Copy link
Contributor

Do you mean that you will update the patch, then?

I don't think that it worth it - these two macros are defined if and only if the compiler is xlc. This is the purpose of the line. You can ask similar question about the previous lines in the same file - why check for defined version. ;-)

Unfortunately I can not submit patch by myself due to legal licensing issues. So, I'll have to ask @bobzhang and etc. :-(

Since it's not enabled for releases there is no problem.

My feeling that there will be no benefit from stopping on xlc warnings. But since we sometimes receive dev version of the compiler, we might have problems with this. On the other hand, if you want, you can add -qhalt=w somewhere around line 409 to internal_cflags.

@shindere
Copy link
Contributor

shindere commented Mar 31, 2017 via email

@gasche gasche merged commit 469eb86 into ocaml:trunk Apr 7, 2017
@gasche
Copy link
Member

gasche commented Apr 7, 2017

I merged, thanks!

@ksromanov
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants