-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
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.
This seems clearly non-invasive for other architectures, so I would be in favor of merging. |
Could you maybe add a Changes entry? People may be interested in knowing that this usage mode is now known to work. |
+#elif defined(__xlc__) && (__xlC__)
+xlc __xlC__ __xlC_ver__
Is it on purpose that the macros tested by the first line are different
from those actually used on the second line?
Out of curiosity: did you try to enable warnings? Does the compiler
report something interesting?
Would you be able to modify the patch so that warnings get enabled on
developemnt versions as is done for gcc?
|
Not on purpose. Actually check for
Unfortunately,
Our experience working with this compiler tells that we should not expect useful warnings from |
Thanks a lot for the prompt feedback, Konstantin.
Konstantin Romanov (2017/03/31 13:48 -0700):
> 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.
Do you mean that you will update the patch, then?
> 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. :-(
Well it is not necessarily a bad news, it can also be taken to mean that
the code is already in a rather nice shape!
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`.
Okay thanks for this information, it is interesting.
2. We can not enable `-Werror` for `XL C`, because it is very likely
that it compilation will just stop on a harmless warning.
Yeah that's why we enable this only for development builds, because from
a dev's perspective it's always interesting to see what a compiler has
to say, a priori. Since it's not enabled for releases there is no
problem.
Our experience working with this compiler tells that we should not
expect useful warnings from `XL C`, if we already fixed all `gcc`
warnings. :-(
OK thanks!
|
I don't think that it worth it - these two macros are defined if and only if the compiler is Unfortunately I can not submit patch by myself due to legal licensing issues. So, I'll have to ask @bobzhang and etc. :-(
My feeling that there will be no benefit from stopping on |
OK, no problem, I was just wondering. Thanks.
|
I merged, thanks! |
Thanks! |
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.