zos: build with -m64 and ignore unknown-pragmas - Explicitly pass -m64 as CC/CXX can be clang/clang++ or ibm-clang/ibm-clang++ rather than their 64-suffixed names. - Ignore unknown-pragma errors as some system headers include pragmas not yet supported by the clang compiler (e.g. #pragma checkout(suspend|resume). - Remove 'install/' from the ZOSLIB default path, as it may not be inside such directory. Change-Id: I2857a1b3a095c96d92c288d0212c70852bf46b64 Reviewed-on: https://gn-review.googlesource.com/c/gn/+/18460 Reviewed-by: Takuto Ikuta <tikuta@google.com> Commit-Queue: David Turner <digit@google.com> Reviewed-by: David Turner <digit@google.com>
diff --git a/build/gen.py b/build/gen.py index cdee2f5..8470373 100755 --- a/build/gen.py +++ b/build/gen.py
@@ -206,8 +206,8 @@ default='../third_party/zoslib', dest='zoslib_dir', help=('Specify the path of ZOSLIB directory, to link ' + - 'with <ZOSLIB_DIR>/install/lib/libzoslib.a, and ' + - 'add -I<ZOSLIB_DIR>/install/include to the compile ' + + 'with <ZOSLIB_DIR>/lib/libzoslib.a, and ' + + 'add -I<ZOSLIB_DIR>/include to the compile ' + 'commands. See README.md for details.')) args_list.add_to_parser(parser) @@ -417,7 +417,7 @@ '.', ] if platform.is_zos(): - include_dirs += [ options.zoslib_dir + '/install/include' ] + include_dirs += [ options.zoslib_dir + '/include' ] libs = [] @@ -531,7 +531,10 @@ cflags.append('-fPIC') cflags.extend(['-D_BSD_SOURCE']) elif platform.is_zos(): + cflags.append('-m64') + ldflags.append('-m64') cflags.append('-fzos-le-char-mode=ascii') + cflags.append('-Wno-unknown-pragmas') cflags.append('-Wno-unused-function') cflags.append('-D_OPEN_SYS_FILE_EXT') cflags.append('-DPATH_MAX=1024') @@ -907,7 +910,7 @@ ]) if platform.is_zos(): - libs.extend([ options.zoslib_dir + '/install/lib/libzoslib.a' ]) + libs.extend([ options.zoslib_dir + '/lib/libzoslib.a' ]) if platform.is_windows(): static_libraries['base']['sources'].extend([