Use /bin/sh as shebang in gdb/make-init-c
authorLancelot SIX <lsix@lancelotsix.com>
Mon, 12 Jul 2021 23:56:03 +0000 (00:56 +0100)
committerLancelot SIX <lsix@lancelotsix.com>
Tue, 13 Jul 2021 22:09:14 +0000 (23:09 +0100)
While testing the NixOS[1] packaging for gdb-11.0.90.tar.xz, IĀ got the
following error:

  [...]
  CXX    aarch32-tdep.o
  CXX    gdb.o
  GEN    init.c
  /nix/store/26a78ync552m8j4sbjavhvkmnqir8c9y-bash-4.4-p23/bin/bash: ./make-init-c: /usr/bin/env: bad interpreter: No such file or directory
  make[2]: *** [Makefile:1866: stamp-init] Error 126
  make[2]: *** Waiting for unfinished jobs....
  make[2]: Leaving directory '/build/gdb-11.0.90/gdb'
  make[1]: *** [Makefile:9814: all-gdb] Error 2
  make[1]: Leaving directory '/build/gdb-11.0.90'
  make: *** [Makefile:903: all] Error 2
  builder for '/nix/store/xs8my3rrc3l4kdlbpx0azh6q0v0jxphr-gdb-gdb-11.0.90.drv' failed with exit code 2
  error: build of '/nix/store/xs8my3rrc3l4kdlbpx0azh6q0v0jxphr-gdb-gdb-11.0.90.drv' failed

In the nix build environment, /usr/bin/env is not present, only /bin/sh
is.  This patch makes sure that gdb/make-init-c uses '/bin/sh' as
interpreter as this is the only one available on this platform.

I do not think this change will cause regressions on any other
configuration.

[1] https://nixos.org/

gdb/Changelog

* make-init-c: Use /bin/sh as shebang.

gdb/ChangeLog
gdb/make-init-c

index b766a0b2638b2d73475265da3132a371cce7f1b5..f5fab342c62c8a7662c17b50de8650f7cc558e61 100644 (file)
@@ -1,3 +1,7 @@
+2021-07-13  Lancelot Six  <lsix@lancelotsix.com>
+
+       * make-init-c: Use /bin/sh as shebang.
+
 2021-07-13  Pedro Alves  <pedro@palves.net>
 
        PR gdb/28080
index e3c5985f133ed33033087338a776dfd327df80f6..d8630591c89eaa0b3bd14fec28e3201e45c1e27c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/bin/sh
 
 # Copyright (C) 2013-2021 Free Software Foundation, Inc.
 #
This page took 0.027113 seconds and 4 git commands to generate.