[PATCH] D86707: [SystemZ][z/OS] Adding initial toolchain for z/OS

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 31 14:48:32 PDT 2020


hubert.reinterpretcast accepted this revision.
hubert.reinterpretcast added a comment.
This revision is now accepted and ready to land.

LGTM with minor comments.



================
Comment at: clang/lib/Driver/ToolChains/ZOS.cpp:15
+
+using namespace clang::driver;
+using namespace clang::driver::toolchains;
----------------
There should be no need for this using directive. The lookup following the //declarator-id// in the declarations should operate in the context of the namespace that "owns" the function. There's a chance it's needed because of MSVC build problems though.


================
Comment at: clang/lib/Driver/ToolChains/ZOS.cpp:18
+using namespace llvm::opt;
+using namespace clang;
+
----------------
Same comment.


================
Comment at: clang/lib/Driver/ToolChains/ZOS.h:25
+
+  bool isPICDefault() const override { return false; }
+  bool isPIEDefault() const override { return false; }
----------------
abhina.sreeskantharajan wrote:
> hubert.reinterpretcast wrote:
> > According to the RFC re: LLVM on z/OS, the initial support in LLVM for z/OS is only for XPLink. My understanding is that all XPLink applications are DLL-enabled. Does being DLL-enabled not imply that the code is position-independent?
> > 
> > I understand that the value of the `__DLL__` predefined macro from the XL C compiler does not reflect the implicit DLL-enablement of XPLink code; however, I also note that the same compiler claims falsely that `Option NODLL is ignored because option XPLINK is specified` when `-qnodll` does actually suppress the effect of an earlier `-qdll` in causing `__DLL__` to be defined.
> This is not always true because we do not require code to be PIC on z/OS, even for XPLink applications. Absolute addresses may be present in code sections for easier access (e.g. in calls to linkages, branch tables). We also may link to libraries that contain non-PIC code.
Got it (I think). Load-time relocations can occur within the program text instead of using PIC code.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86707/new/

https://reviews.llvm.org/D86707



More information about the cfe-commits mailing list