Debian Patches

Status for libf2c2/20140711-1

Patch Description Author Forwarded Bugs Origin Last update
0001-upstream-changelog.patch upstream changelog "Barak A. Pearlmutter" <> no 2016-01-11
0002-makefile-simplify-two-libs.patch makefile simplify two libs "Barak A. Pearlmutter" <> no 2016-01-11
0003-C-tweaks.patch C tweaks "Barak A. Pearlmutter" <> no 2016-01-11
0004-add-clapack-files.patch add clapack files
Adding two files that are part of clapack source
The clapack archive that can be downloaded at
contains a copy of f2c. This copy is basically identical but it includes
two files which are missing in the source which was the base for the libf2c2
package. Since the functions inside these files are used inside the test suite
of clapack the files were added here to avoid code duplication.

Add missing files also to makefile.u to get them built
Andreas Tille <> no 2016-05-25
0005-format-security.patch format security
Test breaks format security and should be fulfilled on Linux anyway.
(See discussion on debian-mentors list in May 2016)
Andreas Tille <> no 2016-05-21
0006-weak-MAIN__.patch weak MAIN__
Make MAIN__ a weak symbol

Make MAIN__ a weak symbol, to make sure that non-f2c binaries can link
against libraries created by it. Also make main() a weak symbol, just
in case, because we really don't want to override a C program's main
Christian Seiler <> no debian 2016-06-03
0007-format-security-sprintf.patch format security sprintf
Squash potential buffer overflow noticed by GCC. Note that even if
this is not an actual danger, a false positive can cause FTBFS in a
high security environment.

open.c: In function ‘fk_open’:
open.c:222:28: warning: ‘%ld’ directive writing between 1 and 11 bytes into a region of size 5 [-Wformat-overflow=]
(void) sprintf(nbuf,"fort.%ld",(long)n);
open.c:222:22: note: directive argument in the range [-2147483648, 2147483647]
(void) sprintf(nbuf,"fort.%ld",(long)n);
open.c:222:2: note: ‘sprintf’ output between 7 and 17 bytes into a destination of size 10
(void) sprintf(nbuf,"fort.%ld",(long)n);
"Barak A. Pearlmutter" <> no 2018-02-25
0008-XintXX_t.patch XintXX_t
Instead of casing off on architectures, use int/uint _ 16/32/64.
"Barak A. Pearlmutter" <> no 2020-07-07
0009-F77_aloc-type.patch F77_aloc type
Be consistent about type of F77_aloc(). Ultimately it calls
malloc(size_t) so just use size_t for the length.

See which says:

... research compiler tool-chain ... which permits extended reporting
on type inconsistencies at link time.

gcc -shared -Wl,-soname,\
-o *.o -lc -lm

old definition in module f77_aloc file f77_aloc.c line 29
char * (signed int Len, const char *whence)
new definition in module getenv_ file getenv_.c line 11
char * (signed short int, const char *)
debian/make_lib:4: recipe for target 'all' failed
make[1]: *** [all] Error 64

The original declarations can be reviewed here:

It seems that the latter should be adjusted, replacing ftnlen by integer. One
may hope that the remaining bytes (for all systems with sizeof(short
int)<sizeof(int)) happen to be zero - but on big endian systems this should
yield some fun. (Not.)
"Barak A. Pearlmutter" <> no 2020-07-09
0010-largefile_source-redefinition.patch largefile_source redefinition
Avoid re#definition of _LARGEFILE{,64}_SOURCE
"Barak A. Pearlmutter" <> no 2020-07-09
0011-cross.patch cross
The file makefile.u hard codes the build architecture ld, which needs
to be made substitutable for cross compilation.
Helmut Grohne <> no 2020-07-06

All known versions for source package 'libf2c2'