Skip to content

Commit

Permalink
Unbreak build with -fno-common
Browse files Browse the repository at this point in the history
-fno-common is the default in GCC10 and will also be the default
in Clang11.

ld: error: duplicate symbol: nbactions
>>> defined at add.c
>>>            add.o:(nbactions)
>>> defined at alias.c
>>>            alias.o:(.bss+0x0)

ld: error: duplicate symbol: nbdone
>>> defined at add.c
>>>            add.o:(nbdone)
>>> defined at alias.c
>>>            alias.o:(.bss+0x4)

ld: error: duplicate symbol: nbtodl
>>> defined at add.c
>>>            add.o:(nbtodl)
>>> defined at alias.c
>>>            alias.o:(.bss+0x8)

ld: error: duplicate symbol: nbactions
>>> defined at add.c
>>>            add.o:(nbactions)
>>> defined at annotate.c
>>>            annotate.o:(.bss+0x0)

ld: error: duplicate symbol: nbdone
>>> defined at add.c
>>>            add.o:(nbdone)
>>> defined at annotate.c
>>>            annotate.o:(.bss+0x4)

ld: error: duplicate symbol: nbtodl
>>> defined at add.c
>>>            add.o:(nbtodl)
>>> defined at annotate.c
>>>            annotate.o:(.bss+0x8)

ld: error: duplicate symbol: nbactions
>>> defined at add.c
>>>            add.o:(nbactions)
>>> defined at audit.c
>>>            audit.o:(.bss+0x0)

ld: error: duplicate symbol: nbdone
>>> defined at add.c
>>>            add.o:(nbdone)
>>> defined at audit.c
>>>            audit.o:(.bss+0x4)

ld: error: duplicate symbol: nbtodl
>>> defined at add.c
>>>            add.o:(nbtodl)
>>> defined at audit.c
>>>            audit.o:(.bss+0x8)

ld: error: duplicate symbol: nbactions
>>> defined at add.c
>>>            add.o:(nbactions)
>>> defined at autoremove.c
>>>            autoremove.o:(.bss+0x4)

ld: error: duplicate symbol: nbdone
>>> defined at add.c
>>>            add.o:(nbdone)
>>> defined at autoremove.c
>>>            autoremove.o:(.bss+0x0)

ld: error: duplicate symbol: nbtodl
>>> defined at add.c
>>>            add.o:(nbtodl)
>>> defined at autoremove.c
>>>            autoremove.o:(.bss+0x8)

ld: error: duplicate symbol: nbactions
>>> defined at add.c
>>>            add.o:(nbactions)
>>> defined at backup.c
>>>            backup.o:(.bss+0x0)

ld: error: duplicate symbol: nbdone
>>> defined at add.c
>>>            add.o:(nbdone)
>>> defined at backup.c
>>>            backup.o:(.bss+0x4)

ld: error: duplicate symbol: nbtodl
>>> defined at add.c
>>>            add.o:(nbtodl)
>>> defined at backup.c
>>>            backup.o:(.bss+0x8)

ld: error: duplicate symbol: nbactions
>>> defined at add.c
>>>            add.o:(nbactions)
>>> defined at check.c
>>>            check.o:(.bss+0x4)

ld: error: duplicate symbol: nbdone
>>> defined at add.c
>>>            add.o:(nbdone)
>>> defined at check.c
>>>            check.o:(.bss+0x0)

ld: error: duplicate symbol: nbtodl
>>> defined at add.c
>>>            add.o:(nbtodl)
>>> defined at check.c
>>>            check.o:(.bss+0x8)

ld: error: duplicate symbol: nbactions
>>> defined at add.c
>>>            add.o:(nbactions)
>>> defined at clean.c
>>>            clean.o:(.bss+0x0)

ld: error: duplicate symbol: nbdone
>>> defined at add.c
>>>            add.o:(nbdone)
>>> defined at clean.c
>>>            clean.o:(.bss+0x4)

Signed-off-by: Tobias Kortkamp <t@tobik.me>
  • Loading branch information
Tobias Kortkamp authored and bapt committed Jul 27, 2020
1 parent ab21dfb commit 7fbde60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/globals.c
Expand Up @@ -31,6 +31,9 @@ int case_sensitive; /* Case sensitive queries */
int force; /* Forced operation */
int quiet; /* Silent output */
int newpkgversion; /* New package version is available */
int nbactions;
int nbdone;
int nbtodl;

void
set_globals(void)
Expand All @@ -43,5 +46,8 @@ set_globals(void)
force = 0;
quiet = 0;
newpkgversion = 0;
nbactions = 0;
nbdone = 0;
nbtodl = 0;
}

3 changes: 0 additions & 3 deletions src/pkgcli.h
Expand Up @@ -37,12 +37,9 @@

extern bool quiet;
extern int nbactions;
int nbactions;
extern int nbdone;
int nbdone;
extern bool newpkgversion;
extern int nbtodl;
int nbtodl;

/* pkg add */
int exec_add(int, char **);
Expand Down

0 comments on commit 7fbde60

Please sign in to comment.