[Bug cobol/119231] gcobol -static produces a dynamically linked executable

2025-07-29 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119231

--- Comment #3 from GCC Commits  ---
The releases/gcc-15 branch has been updated by Robert Dubner
:

https://gcc.gnu.org/g:4e568451bface5d15fc0bb28bc6794612f32677c

commit r15-10153-g4e568451bface5d15fc0bb28bc6794612f32677c
Author: Robert Dubner 
Date:   Thu Jul 24 12:09:36 2025 -0400

cobol: Honor the "-static" command-line option. [PR119231]

gcc/cobol/ChangeLog:

PR cobol/119231
* gcobolspec.cc: (lang_specific_driver): Pass OPT_static through.
Handle -static and -static-libgcobol properly.

gcc/testsuite/ChangeLog:

* cobol.dg/group2/_-static__compilation.cob: Modify for -static
warning.
* cobol.dg/group2/_-static__compilation.out: Removed.

(cherry picked from commit 44e32178031e89399710c3ee7444891631a9c8ec)

[Bug cobol/119231] gcobol -static produces a dynamically linked executable

2025-07-24 Thread rdubner at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119231

Robert Dubner  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Robert Dubner  ---
A program compiled with

  gcobol hello.cbl -static

now reports

$ file test
test: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically
linked, BuildID[sha1]=3c37c93560c162fe93c00370d42d1d1743541094, for GNU/Linux
3.2.0, with debug_info, not stripped

Otherwise:

$ file test
test: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically
linked, interpreter /lib64/ld-linux-x86-64.so.2,
BuildID[sha1]=e4358da4a6b34b86f75f5b23759e4c6b3ab5bd80, for GNU/Linux 3.2.0,
with debug_info, not stripped

So, I am closing it out.

Thanks for finding the problem.

Bob D.

[Bug cobol/119231] gcobol -static produces a dynamically linked executable

2025-07-24 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119231

--- Comment #1 from GCC Commits  ---
The master branch has been updated by Robert Dubner :

https://gcc.gnu.org/g:44e32178031e89399710c3ee7444891631a9c8ec

commit r16-2489-g44e32178031e89399710c3ee7444891631a9c8ec
Author: Robert Dubner 
Date:   Thu Jul 24 12:09:36 2025 -0400

cobol: Honor the "-static" command-line option. [PR119231]

gcc/cobol/ChangeLog:

PR cobol/119231
* gcobolspec.cc: (lang_specific_driver): Pass OPT_static through.
Handle -static and -static-libgcobol properly.

gcc/testsuite/ChangeLog:

* cobol.dg/group2/_-static__compilation.cob: Modify for -static
warning.
* cobol.dg/group2/_-static__compilation.out: Removed.

[Bug cobol/119231] gcobol -static produces a dynamically linked executable

2025-05-21 Thread jklowden at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119231

James K. Lowden  changed:

   What|Removed |Added

 CC||jklowden at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |rdubner at gcc dot 
gnu.org
   Last reconfirmed||2025-05-21
 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED