diff mbox series

[v4] build: support z/OS (OS/390).

Message ID pull.1663.v4.git.git.1709703857881.gitgitgadget@gmail.com (mailing list archive)
State Accepted
Commit d254e65092daba8667d6b4d5b4f59c099c1edd1f
Headers show
Series [v4] build: support z/OS (OS/390). | expand

Commit Message

Haritha D March 6, 2024, 5:44 a.m. UTC
From: Haritha D <harithamma.d@ibm.com>

Introduced z/OS (OS/390) as a platform in config.mak.uname

Signed-off-by: Haritha D <harithamma.d@ibm.com>
---
    This PR enables a successful git build on z/OS.
    
    Introduced z/OS (OS/390) as a platform in config.mak.uname

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1663%2FHarithaIBM%2Fzos-v4
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1663/HarithaIBM/zos-v4
Pull-Request: https://github.com/git/git/pull/1663

Range-diff vs v3:

 1:  2f1ad41bc14 ! 1:  cbc38a801e9 build: support z/OS (OS/390).
     @@ Metadata
       ## Commit message ##
          build: support z/OS (OS/390).
      
     -    Since the z/OS linker does not support searching dynamic libraries,
     -    and the current setting of CC_LD_DYNPATH results in a directory
     -    to be supplied to the link step with no option as the suffix,
     -    it causes a linker error because the z/OS LD linker
     -    does not accept directories as input.
     -    Therefore, -L option is added.
     -    Also introduced z/OS (OS/390) as a platform in config.mak.uname
     +    Introduced z/OS (OS/390) as a platform in config.mak.uname
      
          Signed-off-by: Haritha D <harithamma.d@ibm.com>
      
     @@ config.mak.uname: ifeq ($(uname_S),NONSTOP_KERNEL)
       	SHELL_PATH = /usr/coreutils/bin/bash
       endif
      +ifeq ($(uname_S),OS/390)
     -+        NO_SYS_POLL_H = YesPlease
     -+        NO_STRCASESTR = YesPlease
     -+        NO_REGEX = YesPlease
     -+        NO_MMAP = YesPlease
     -+        NO_NSEC = YesPlease
     -+        NO_STRLCPY = YesPlease
     -+        NO_MEMMEM = YesPlease
     -+        NO_GECOS_IN_PWENT = YesPlease
     -+        HAVE_STRINGS_H = YesPlease
     -+       NEEDS_MODE_TRANSLATION = YesPlease
     ++	NO_SYS_POLL_H = YesPlease
     ++	NO_STRCASESTR = YesPlease
     ++	NO_REGEX = YesPlease
     ++	NO_MMAP = YesPlease
     ++	NO_NSEC = YesPlease
     ++	NO_STRLCPY = YesPlease
     ++	NO_MEMMEM = YesPlease
     ++	NO_GECOS_IN_PWENT = YesPlease
     ++	HAVE_STRINGS_H = YesPlease
     ++	NEEDS_MODE_TRANSLATION = YesPlease
      +endif
       ifeq ($(uname_S),MINGW)
       	ifeq ($(shell expr "$(uname_R)" : '1\.'),2)


 config.mak.uname | 12 ++++++++++++
 1 file changed, 12 insertions(+)


base-commit: b387623c12f3f4a376e4d35a610fd3e55d7ea907

Comments

Junio C Hamano March 6, 2024, 4:10 p.m. UTC | #1
"Haritha  via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Haritha D <harithamma.d@ibm.com>
>
> Introduced z/OS (OS/390) as a platform in config.mak.uname
>
> Signed-off-by: Haritha D <harithamma.d@ibm.com>
> ---
>     This PR enables a successful git build on z/OS.

Good.

>  config.mak.uname | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/config.mak.uname b/config.mak.uname
> index dacc95172dc..d0dcca2ec55 100644
> --- a/config.mak.uname
> +++ b/config.mak.uname
> @@ -638,6 +638,18 @@ ifeq ($(uname_S),NONSTOP_KERNEL)
>  	SANE_TOOL_PATH = /usr/coreutils/bin:/usr/local/bin
>  	SHELL_PATH = /usr/coreutils/bin/bash
>  endif
> +ifeq ($(uname_S),OS/390)
> +	NO_SYS_POLL_H = YesPlease
> +	NO_STRCASESTR = YesPlease
> +	NO_REGEX = YesPlease
> +	NO_MMAP = YesPlease
> +	NO_NSEC = YesPlease
> +	NO_STRLCPY = YesPlease
> +	NO_MEMMEM = YesPlease
> +	NO_GECOS_IN_PWENT = YesPlease
> +	HAVE_STRINGS_H = YesPlease
> +	NEEDS_MODE_TRANSLATION = YesPlease
> +endif

I somehow expected you to throw in the -L thing in this block,
perhaps like

	CC_LD_DYNPATH =

to help those who are on OS/390 but do not run configure (made from
configure.ac) to create the config.mak.autogen file, but if you are
always building with configure and not testing such a configuration,
then doing so and shipping an untested code would not be prudent, so
let's accept this patch as-is.

Thanks for working on this.  Will queue.
diff mbox series

Patch

diff --git a/config.mak.uname b/config.mak.uname
index dacc95172dc..d0dcca2ec55 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -638,6 +638,18 @@  ifeq ($(uname_S),NONSTOP_KERNEL)
 	SANE_TOOL_PATH = /usr/coreutils/bin:/usr/local/bin
 	SHELL_PATH = /usr/coreutils/bin/bash
 endif
+ifeq ($(uname_S),OS/390)
+	NO_SYS_POLL_H = YesPlease
+	NO_STRCASESTR = YesPlease
+	NO_REGEX = YesPlease
+	NO_MMAP = YesPlease
+	NO_NSEC = YesPlease
+	NO_STRLCPY = YesPlease
+	NO_MEMMEM = YesPlease
+	NO_GECOS_IN_PWENT = YesPlease
+	HAVE_STRINGS_H = YesPlease
+	NEEDS_MODE_TRANSLATION = YesPlease
+endif
 ifeq ($(uname_S),MINGW)
 	ifeq ($(shell expr "$(uname_R)" : '1\.'),2)
 		$(error "Building with MSys is no longer supported")