gcc10 fixes

This commit is contained in:
Tom Callaway 2020-01-23 16:29:56 -05:00
parent 2770f584df
commit 7360b2a1f6
5 changed files with 353 additions and 1 deletions

View File

@ -0,0 +1,249 @@
diff -up texlive-base-20190410/source/utils/autosp/autosp-src/autosp.c.externfix texlive-base-20190410/source/utils/autosp/autosp-src/autosp.c
--- texlive-base-20190410/source/utils/autosp/autosp-src/autosp.c.externfix 2020-01-23 13:07:24.044942747 -0500
+++ texlive-base-20190410/source/utils/autosp/autosp-src/autosp.c 2020-01-23 13:12:41.905857613 -0500
@@ -82,6 +82,13 @@ char version[12] = "2019-01-08";
# include "autosp.h"
+char infilename[SHORT_LEN];
+char *infilename_n;
+char outfilename[SHORT_LEN];
+char *outfilename_n;
+char logfilename[SHORT_LEN];
+char *logfilename_n;
+FILE *infile, *outfile, *logfile;
PRIVATE void
usage ()
diff -up texlive-base-20190410/source/utils/autosp/autosp-src/autosp.h.externfix texlive-base-20190410/source/utils/autosp/autosp-src/autosp.h
--- texlive-base-20190410/source/utils/autosp/autosp-src/autosp.h.externfix 2020-01-23 13:02:59.186403822 -0500
+++ texlive-base-20190410/source/utils/autosp/autosp-src/autosp.h 2020-01-23 13:12:30.912087145 -0500
@@ -25,16 +25,16 @@
# define SHORT_LEN 256
-bool debug;
-bool dottedbeamnotes; /* dotted beam notes ignored? */
+extern bool debug;
+extern bool dottedbeamnotes; /* dotted beam notes ignored? */
-char infilename[SHORT_LEN];
-char *infilename_n;
-char outfilename[SHORT_LEN];
-char *outfilename_n;
-char logfilename[SHORT_LEN];
-char *logfilename_n;
-FILE *infile, *outfile, *logfile;
+extern char infilename[SHORT_LEN];
+extern char *infilename_n;
+extern char outfilename[SHORT_LEN];
+extern char *outfilename_n;
+extern char logfilename[SHORT_LEN];
+extern char *logfilename_n;
+extern FILE *infile, *outfile, *logfile;
void process_score ();
diff -up texlive-base-20190410/source/utils/autosp/autosp-src/process_command.c.externfix texlive-base-20190410/source/utils/autosp/autosp-src/process_command.c
--- texlive-base-20190410/source/utils/autosp/autosp-src/process_command.c.externfix 2020-01-23 13:23:55.275608432 -0500
+++ texlive-base-20190410/source/utils/autosp/autosp-src/process_command.c 2020-01-23 13:26:00.074878265 -0500
@@ -1,5 +1,37 @@
# include "process_command.h"
+char terminator[MAX_STAFFS]; /* one of '&' "|', '$' */
+char *notes[MAX_STAFFS]; /* note segment for ith staff */
+char *current[MAX_STAFFS];
+int spacings[MAX_STAFFS]; /* spacing for ith staff */
+int vspacing[MAX_STAFFS]; /* virtual-note (skip) spacing */
+bool vspacing_active[MAX_STAFFS]; /* virtual-note spacing active? */
+ /* used to preclude unnecessary pre-accidental skips */
+bool nonvirtual_notes; /* used to preclude output of *only* virtual notes */
+int cspacing[MAX_STAFFS]; /* nominal collective-note spacing */
+char collective[MAX_STAFFS][SHORT_LEN];
+ /* prefixes for collective note sequences */
+bool first_collective[MAX_STAFFS];
+char deferred_bar[SHORT_LEN]; /* deferred \bar (or \endpiece etc.) */
+int beaming[MAX_STAFFS]; /* spacing for beamed notes */
+int new_beaming;
+int semiauto_beam_notes[MAX_STAFFS]; /* semi-automatic beam notes */
+/* save-restore state for a staff; used in process_xtuplet */
+int beamingi;
+char *currenti;
+int cspacingi;
+int vspacingi;
+char collectivei[SHORT_LEN];
+bool first_collectivei;
+int xtuplet[MAX_STAFFS]; /* x for xtuplet in staff i */
+bool appoggiatura;
+char outstrings[MAX_STAFFS][LINE_LEN];
+ /* accumulate commands to be output */
+char *n_outstrings[MAX_STAFFS];
+int global_skip;
+/* = 1, 2, 3, or 4 for (non-standard) commands \QQsk \HQsk \TQsk \Qsk */
+/* = 5 for five commas and double-flat accidental spacing */
+/* = 6 for six commas */
void process_xtuplet (void);
diff -up texlive-base-20190410/source/utils/autosp/autosp-src/process_command.h.externfix texlive-base-20190410/source/utils/autosp/autosp-src/process_command.h
--- texlive-base-20190410/source/utils/autosp/autosp-src/process_command.h.externfix 2020-01-23 13:18:54.495606362 -0500
+++ texlive-base-20190410/source/utils/autosp/autosp-src/process_command.h 2020-01-23 13:23:33.154094850 -0500
@@ -8,47 +8,47 @@
# define NOTEsp "\\vnotes9.52\\elemskip"
# define APPOGG_NOTES "\\vnotes1.45\\elemskip"
-char terminator[MAX_STAFFS]; /* one of '&' "|', '$' */
+extern char terminator[MAX_STAFFS]; /* one of '&' "|', '$' */
-char *notes[MAX_STAFFS]; /* note segment for ith staff */
-char *current[MAX_STAFFS];
+extern char *notes[MAX_STAFFS]; /* note segment for ith staff */
+extern char *current[MAX_STAFFS];
-int spacings[MAX_STAFFS]; /* spacing for ith staff */
+extern int spacings[MAX_STAFFS]; /* spacing for ith staff */
-int vspacing[MAX_STAFFS]; /* virtual-note (skip) spacing */
-bool vspacing_active[MAX_STAFFS]; /* virtual-note spacing active? */
+extern int vspacing[MAX_STAFFS]; /* virtual-note (skip) spacing */
+extern bool vspacing_active[MAX_STAFFS]; /* virtual-note spacing active? */
/* used to preclude unnecessary pre-accidental skips */
-bool nonvirtual_notes; /* used to preclude output of *only* virtual notes */
+extern bool nonvirtual_notes; /* used to preclude output of *only* virtual notes */
-int cspacing[MAX_STAFFS]; /* nominal collective-note spacing */
-char collective[MAX_STAFFS][SHORT_LEN];
+extern int cspacing[MAX_STAFFS]; /* nominal collective-note spacing */
+extern char collective[MAX_STAFFS][SHORT_LEN];
/* prefixes for collective note sequences */
-bool first_collective[MAX_STAFFS];
+extern bool first_collective[MAX_STAFFS];
-char deferred_bar[SHORT_LEN]; /* deferred \bar (or \endpiece etc.) */
+extern char deferred_bar[SHORT_LEN]; /* deferred \bar (or \endpiece etc.) */
-int beaming[MAX_STAFFS]; /* spacing for beamed notes */
-int new_beaming;
-int semiauto_beam_notes[MAX_STAFFS]; /* semi-automatic beam notes */
+extern int beaming[MAX_STAFFS]; /* spacing for beamed notes */
+extern int new_beaming;
+extern int semiauto_beam_notes[MAX_STAFFS]; /* semi-automatic beam notes */
/* save-restore state for a staff; used in process_xtuplet */
-int beamingi;
-char *currenti;
-int cspacingi;
-int vspacingi;
-char collectivei[SHORT_LEN];
-bool first_collectivei;
+extern int beamingi;
+extern char *currenti;
+extern int cspacingi;
+extern int vspacingi;
+extern char collectivei[SHORT_LEN];
+extern bool first_collectivei;
-int xtuplet[MAX_STAFFS]; /* x for xtuplet in staff i */
+extern int xtuplet[MAX_STAFFS]; /* x for xtuplet in staff i */
-bool appoggiatura;
+extern bool appoggiatura;
-char outstrings[MAX_STAFFS][LINE_LEN];
+extern char outstrings[MAX_STAFFS][LINE_LEN];
/* accumulate commands to be output */
-char *n_outstrings[MAX_STAFFS];
+extern char *n_outstrings[MAX_STAFFS];
-int global_skip;
+extern int global_skip;
/* = 1, 2, 3, or 4 for (non-standard) commands \QQsk \HQsk \TQsk \Qsk */
/* = 5 for five commas and double-flat accidental spacing */
/* = 6 for six commas */
diff -up texlive-base-20190410/source/utils/autosp/autosp-src/process_score.c.externfix texlive-base-20190410/source/utils/autosp/autosp-src/process_score.c
--- texlive-base-20190410/source/utils/autosp/autosp-src/process_score.c.externfix 2020-01-23 13:17:36.073400920 -0500
+++ texlive-base-20190410/source/utils/autosp/autosp-src/process_score.c 2020-01-23 13:18:29.827262141 -0500
@@ -1,5 +1,20 @@
# include "process_score.h"
+int staffs[MAX_STAFFS]; /* number of staffs for ith instrument*/
+bool active[MAX_STAFFS]; /* is staff i active? */
+bool bar_rest[MAX_STAFFS];
+int spacing; /* spacing for current notes */
+int restbars;
+char global_skip_str[7][16];
+int ninstr; /* number of instruments */
+int nstaffs; /* number of staffs */
+int nastaffs; /* number of active staffs; */
+int old_spacing;
+bool Changeclefs; /* output \Changeclefs after \def\atnextbar */
+char TransformNotes2[SHORT_LEN];/* 2nd argument of \TransformNotes */
+bool TransformNotesDefined;
+char line[LINE_LEN]; /* line of input */
+
void process_line ()
{
char *ln;
diff -up texlive-base-20190410/source/utils/autosp/autosp-src/process_score.h.externfix texlive-base-20190410/source/utils/autosp/autosp-src/process_score.h
--- texlive-base-20190410/source/utils/autosp/autosp-src/process_score.h.externfix 2020-01-23 13:13:28.767879231 -0500
+++ texlive-base-20190410/source/utils/autosp/autosp-src/process_score.h 2020-01-23 13:16:56.554238138 -0500
@@ -6,21 +6,21 @@
# define SP(note) (SMALL_NOTE/note)
/* note = { 256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 } */
# define MAX_SPACING 2*SP(1)
-int staffs[MAX_STAFFS]; /* number of staffs for ith instrument*/
-bool active[MAX_STAFFS]; /* is staff i active? */
-bool bar_rest[MAX_STAFFS];
-int spacing; /* spacing for current notes */
-int restbars;
-char global_skip_str[7][16];
-int ninstr; /* number of instruments */
-int nstaffs; /* number of staffs */
-int nastaffs; /* number of active staffs; */
-int old_spacing;
-bool Changeclefs; /* output \Changeclefs after \def\atnextbar */
-char TransformNotes2[SHORT_LEN]; /* 2nd argument of \TransformNotes */
-bool TransformNotesDefined;
+extern int staffs[MAX_STAFFS]; /* number of staffs for ith instrument*/
+extern bool active[MAX_STAFFS]; /* is staff i active? */
+extern bool bar_rest[MAX_STAFFS];
+extern int spacing; /* spacing for current notes */
+extern int restbars;
+extern char global_skip_str[7][16];
+extern int ninstr; /* number of instruments */
+extern int nstaffs; /* number of staffs */
+extern int nastaffs; /* number of active staffs; */
+extern int old_spacing;
+extern bool Changeclefs; /* output \Changeclefs after \def\atnextbar */
+extern char TransformNotes2[SHORT_LEN]; /* 2nd argument of \TransformNotes */
+extern bool TransformNotesDefined;
-char line[LINE_LEN]; /* line of input */
+extern char line[LINE_LEN]; /* line of input */
void process_line ();
diff -up texlive-base-20190410/source/utils/autosp/autosp-src/utils.c.externfix texlive-base-20190410/source/utils/autosp/autosp-src/utils.c
--- texlive-base-20190410/source/utils/autosp/autosp-src/utils.c.externfix 2020-01-23 13:05:26.584382978 -0500
+++ texlive-base-20190410/source/utils/autosp/autosp-src/utils.c 2020-01-23 13:05:37.343164091 -0500
@@ -24,6 +24,8 @@
# include "utils.h"
+int lineno;
+
void
warning (const char msg[]) /* output warning message msg to stderr */
{
diff -up texlive-base-20190410/source/utils/autosp/autosp-src/utils.h.externfix texlive-base-20190410/source/utils/autosp/autosp-src/utils.h
--- texlive-base-20190410/source/utils/autosp/autosp-src/utils.h.externfix 2020-01-23 13:04:15.805822929 -0500
+++ texlive-base-20190410/source/utils/autosp/autosp-src/utils.h 2020-01-23 13:04:25.408627563 -0500
@@ -61,6 +61,6 @@ extern size_t append (char *dst, char **
extern bool prefix (const char *cs, const char *ct); /* is string cs[] a prefix of ct[]? */
extern bool suffix (const char *cs, const char *ct); /* is string cs[] a suffix of ct[]? */
-int lineno;
+extern int lineno;
extern void error (const char msg[]); /* abort with stderr message msg */
extern void warning (const char msg[]); /* output warning message msg to stderr */

View File

@ -0,0 +1,63 @@
diff -up texlive-base-20190410/source/texk/web2c/luatexdir/font/luatexfont.h.externfix texlive-base-20190410/source/texk/web2c/luatexdir/font/luatexfont.h
--- texlive-base-20190410/source/texk/web2c/luatexdir/font/luatexfont.h.externfix 2020-01-23 14:39:03.317389393 -0500
+++ texlive-base-20190410/source/texk/web2c/luatexdir/font/luatexfont.h 2020-01-23 14:39:24.282963661 -0500
@@ -128,8 +128,8 @@ int write_tounicode(PDF, char **, char *
void replace_packet_fonts(internal_font_number f, int *old_fontid, int *new_fontid, int count);
int *packet_local_fonts(internal_font_number f, int *num);
-int packet_cur_s; /* current |do_vf_packet()| recursion level */
-int packet_stack_ptr; /* pointer into |packet_stack| */
+extern int packet_cur_s; /* current |do_vf_packet()| recursion level */
+extern int packet_stack_ptr; /* pointer into |packet_stack| */
vf_struct *new_vfstruct(void);
/* writecff.c */
diff -up texlive-base-20190410/source/texk/web2c/luatexdir/font/vfpacket.c.externfix texlive-base-20190410/source/texk/web2c/luatexdir/font/vfpacket.c
diff -up texlive-base-20190410/source/texk/web2c/luatexdir/image/writeimg.h.externfix texlive-base-20190410/source/texk/web2c/luatexdir/image/writeimg.h
--- texlive-base-20190410/source/texk/web2c/luatexdir/image/writeimg.h.externfix 2020-01-23 14:44:11.720101536 -0500
+++ texlive-base-20190410/source/texk/web2c/luatexdir/image/writeimg.h 2020-01-23 14:44:27.964767014 -0500
@@ -26,7 +26,7 @@
# include "pdf/pdfpage.h"
typedef image_dict *idict_entry;
-idict_entry *idict_array;
+extern idict_entry *idict_array;
void new_img_pdfstream_struct(image_dict *);
image *new_image(void);
diff -up texlive-base-20190410/source/texk/web2c/luatexdir/pdf/pdftables.h.externfix texlive-base-20190410/source/texk/web2c/luatexdir/pdf/pdftables.h
--- texlive-base-20190410/source/texk/web2c/luatexdir/pdf/pdftables.h.externfix 2020-01-23 14:35:18.313067342 -0500
+++ texlive-base-20190410/source/texk/web2c/luatexdir/pdf/pdftables.h 2020-01-23 14:35:27.367878245 -0500
@@ -21,7 +21,7 @@
#ifndef PDFTABLES_H
# define PDFTABLES_H
-const char *pdf_obj_typenames[PDF_OBJ_TYPE_MAX + 1];
+extern const char *pdf_obj_typenames[PDF_OBJ_TYPE_MAX + 1];
typedef enum {
union_type_int,
diff -up texlive-base-20190410/source/texk/web2c/luatexdir/pdf/pdfxform.c.externfix texlive-base-20190410/source/texk/web2c/luatexdir/pdf/pdfxform.c
--- texlive-base-20190410/source/texk/web2c/luatexdir/pdf/pdfxform.c.externfix 2020-01-23 14:51:41.427758029 -0500
+++ texlive-base-20190410/source/texk/web2c/luatexdir/pdf/pdfxform.c 2020-01-23 14:51:50.676561145 -0500
@@ -24,8 +24,6 @@ with LuaTeX; if not, see <http://www.gnu
/*tex The form being output: */
-int pdf_cur_form;
-
void pdf_place_form(PDF pdf, halfword p)
{
scaled_whd nat, tex;
diff -up texlive-base-20190410/source/texk/web2c/luatexdir/tex/textoken.c.externfix texlive-base-20190410/source/texk/web2c/luatexdir/tex/textoken.c
--- texlive-base-20190410/source/texk/web2c/luatexdir/tex/textoken.c.externfix 2020-01-23 14:50:52.078796620 -0500
+++ texlive-base-20190410/source/texk/web2c/luatexdir/tex/textoken.c 2020-01-23 14:50:57.659680238 -0500
@@ -76,7 +76,7 @@ unsigned fix_mem_max;
/*tex how much memory is in use */
-int var_used, dyn_used;
+int dyn_used;
/*tex head of the list of available one-word nodes */

View File

@ -0,0 +1,12 @@
diff -up texlive-base-20190410/source/texk/web2c/mplibdir/mp.w.externfix texlive-base-20190410/source/texk/web2c/mplibdir/mp.w
--- texlive-base-20190410/source/texk/web2c/mplibdir/mp.w.externfix 2020-01-23 13:46:37.500459473 -0500
+++ texlive-base-20190410/source/texk/web2c/mplibdir/mp.w 2020-01-23 13:55:29.588893404 -0500
@@ -2958,7 +2958,7 @@ void *mp_xmalloc (MP mp, size_t nmem, si
}
@ @<Internal library declarations@>=
-int mp_snprintf_res ;
+static int mp_snprintf_res ;
/* Some compilers (i.e. gcc 8.2.0 ) complained with the old */
/* #define mp_snprintf (void)snprintf */
/* about truncation. For the moment we store the result. */

View File

@ -0,0 +1,13 @@
diff -up texlive-base-20190410/source/texk/ttf2pk2/ftlib.c.externfix texlive-base-20190410/source/texk/ttf2pk2/ftlib.c
diff -up texlive-base-20190410/source/texk/ttf2pk2/pklib.c.externfix texlive-base-20190410/source/texk/ttf2pk2/pklib.c
--- texlive-base-20190410/source/texk/ttf2pk2/pklib.c.externfix 2020-01-23 15:56:27.041072021 -0500
+++ texlive-base-20190410/source/texk/ttf2pk2/pklib.c 2020-01-23 16:02:05.585252609 -0500
@@ -64,7 +64,7 @@
#define PK_POST (char)245
#define PK_NOP (char)246
-int dpi;
+extern int dpi;
FILE *pk_file;

View File

@ -17,7 +17,7 @@
Name: %{shortname}-base
Version: %{source_date}
Release: 9%{?dist}
Release: 10%{?dist}
Epoch: 7
Summary: TeX formatting system
# The only files in the base package are directories, cache, and license texts
@ -432,6 +432,14 @@ Patch21: texlive-20190410-tlmgr-ignore-warning.patch
# Fix latex-papersize for python3 (thanks to upstream)
Patch22: texlive-base-latex-papersize-py3.patch
Patch23: texlive-base-20190410-poppler-0.84.patch
# GCC10: Fix global vars in autosp
Patch24: texlive-base-20190410-gcc10-autosp-fix-global-vars.patch
# GCC10: Fix global vars in mplib
Patch25: texlive-base-20190410-gcc10-mp-fix-global-var.patch
# GCC10: Fix global vars in luatex
Patch26: texlive-base-20190410-gcc10-luatex-fix-global-vars.patch
# GCC10: Fix global vars in ttf2pk2
Patch27: texlive-base-20190410-gcc10-ttf2pk2-fix-global-var.patch
# Can't do this because it causes everything else to be noarch
@ -6550,6 +6558,10 @@ xz -dc %{SOURCE0} | tar x
%patch19 -p1 -b .shh
%patch20 -p1 -b .fix-libgs-detection
%patch23 -p1 -b .poppler-0.84
%patch24 -p1 -b .gcc10-autosp
%patch25 -p1 -b .gcc10-mplib
%patch26 -p1 -b .gcc10-luatex
%patch27 -p1 -b .gcc10-ttf2pk2
# Setup copies of the licenses
for l in `unxz -c %{SOURCE3} | tar t`; do
@ -9035,6 +9047,9 @@ done <<< "$list"
%doc %{_texdir}/texmf-dist/doc/latex/yplan/
%changelog
* Thu Jan 23 2020 Tom Callaway <spot@fedoraproject.org> - 7:20190410-10
- fix gcc10 issues
* Fri Jan 17 2020 Marek Kasik <mkasik@redhat.com> - 7:20190410-9
- Bring back xindy and the circular dependency on texlive-latex