ports/comms/linrad/files/patch-Makefile.in
Diane Bruce 9a22bc1933 Fix linrad on latest gcc
I checked linrad upstream, and they still haven't fixed these two bugs.  I am surprised they haven't been reported yet.  Without these fixes, linrad cannot be built with gcc5.

the menu.c patch simply reverses the order of the condition.  One must check the bounds constraint first!  It's a pretty dumb mistake but I've seen this kind before.

The second one fails because -Werror is set.  This took me a while because I couldn't figure out the relationship between ADCHANS and rxchan.  In any case, setting 4 locations per channel did indeed allow the array to be big enough.  (at first I thought the loop was running too high, but I finally determined the array was too small).

These were found on DragonFly that uses gcc5.

This patch has not been tested on FreeBSD but I can't how it could possibly fail.

It would be good if the ham@ maintainer reports the issue upstream.

Updated patch files using make makepatch

PR:			ports/199737
Submitted by:		marino
2015-05-01 16:25:48 +00:00

99 lines
3.6 KiB
Text

--- Makefile.in.orig 2014-11-04 10:25:00 UTC
+++ Makefile.in
@@ -23,7 +23,7 @@
#
# ----------- Compilers ----------------
# Use gcc to compile files for Linux.
-CC=gcc
+CC?=gcc
# Name the output files *.ol instead of *.o
# so we definitely know it is for Linux.
# (*.o files can be present by mistake)
@@ -42,7 +42,7 @@ WINNASM64 = C:\mingw\bin\nasm -w-orphan-
# (*.o files can be present by mistake)
# Always use the same flags.
# -Wconversion -Wno-sign-conversion -Wunreachable-code
-CFL = -g -O2 -DOSNUM=1 -DMEMREF_T=int @X11_32_INC@ -W -Wall -DCPU=@CPU@ \
+CFL = -O2 -DOSNUM=1 -DMEMREF_T=int @X11_32_INC@ -W -Wall -DCPU=@CPU@ \
-DSHM_INSTALLED=@LIBXEXT32_OK@ -Wimplicit \
-DALSA_PRESENT=@ALSA32_OK@ -DIA64=0 \
@DARWIN@ -DLIBUDEV_PRESENT=@LIBUDEV_32_OK@ -DSERVER=@MAKE_SERVER@ \
@@ -50,7 +50,7 @@ CFL = -g -O2 -DOSNUM=1 -DMEMREF_T=int @X
-Wuninitialized -Wparentheses -Wstrict-prototypes -Werror -ffast-math \
-Wundef -fomit-frame-pointer -c -o
-CFLN = -g -O2 -DOSNUM=1 -DMEMREF_T=int @X11_32_INC@ -W -Wall \
+CFLN = -O2 -DOSNUM=1 -DMEMREF_T=int @X11_32_INC@ -W -Wall \
-DCPU=@CPU@ -DSHM_INSTALLED=@LIBXEXT32_OK@ -Wimplicit \
-DALSA_PRESENT=@ALSA32_OK@ -DIA64=0 \
@DARWIN@ -DLIBUDEV_PRESENT=@LIBUDEV_32_OK@ -DSERVER=@MAKE_SERVER@ \
@@ -58,13 +58,13 @@ CFLN = -g -O2 -DOSNUM=1 -DMEMREF_T=int @
-Wuninitialized -Wparentheses -Wstrict-prototypes -Werror -ffast-math \
-Wundef -fomit-frame-pointer -c -o
-CFW = -g -O2 -DOSNUM=2 -DMEMREF_T=int -W -Wall -Wimplicit -DIA64=0 \
+CFW = -O2 -DOSNUM=2 -DMEMREF_T=int -W -Wall -Wimplicit -DIA64=0 \
-DLIBUDEV_PRESENT=1 -DCPU=CPU_INTEL -DSERVER=@MAKE_SERVER@ \
@M32@ -Wreturn-type -Wformat -Wunused -Wcomment -Wchar-subscripts \
-Wshadow -Wuninitialized -Wparentheses -Wstrict-prototypes -Werror \
-ffast-math -Wundef -fomit-frame-pointer -c -o
-CFL64 = -g -O2 -DOSNUM=1 -DMEMREF_T='long int' @X11_64_INC@ -W -Wall \
+CFL64 = -O2 -DOSNUM=1 -DMEMREF_T='long int' @X11_64_INC@ -W -Wall \
-DCPU=@CPU@ -DSHM_INSTALLED=@LIBXEXT64_OK@ -DALSA_PRESENT=@ALSA64_OK@ \
-DIA64=1 @DARWIN@ -DLIBUDEV_PRESENT=@LIBUDEV_64_OK@ -DSERVER=@MAKE_SERVER@ \
-Wimplicit -Wreturn-type -Wformat -m64 -Wunused -Wcomment \
@@ -1040,7 +1040,7 @@ fcdpp.ol hid.ol pcie9842.ol bladerf.ol m
@SVGA32_LD@ \
@SVGAGL32_LD@ \
@LIBUDEV_32_LD@ \
--lpthread @LIBRT@ -lm -ldl
+-lpthread @LIBRT@ -lm
@echo " "
@echo "You may want to disable pulseaudio in Ubuntu with this command:"
@@ -1137,7 +1137,7 @@ fcdpp.ol hid.ol pcie9842.ol bladerf.ol m
@X11_32_LD@ \
@ALSA32_LD@ \
@LIBUDEV_32_LD@ \
--lpthread @LIBRT@ -lm -ldl
+-lpthread @LIBRT@ -lm
@echo " "
@echo "You may want to disable pulseaudio in Ubuntu with this command:"
@@ -1210,7 +1210,7 @@ fcdpp.ol hid.ol pcie9842.ol bladerf.ol m
@SVGA32_LD@ \
@SVGAGL32_LD@ \
@LIBUDEV_32_LD@ \
--lpthread @LIBRT@ -lm -ldl
+-lpthread @LIBRT@ -lm
@echo " "
@echo "You may want to disable pulseaudio in Ubuntu with this command:"
@@ -1527,7 +1527,7 @@ fcdpp.om hid.om pcie9842.om bladerf.om m
@SVGA64_LD@ \
@SVGAGL64_LD@ \
@LIBUDEV_64_LD@ \
--lpthread @LIBRT@ -lm -ldl
+-lpthread @LIBRT@ -lm
@echo " "
@echo "You may want to disable pulseaudio in Ubuntu with this command:"
@@ -1612,7 +1612,7 @@ elektor.om fcdpp.om hid.om pcie9842.om b
@ALSA64_LD@ \
@X11_64_LD@ \
@LIBUDEV_64_LD@ \
--lpthread @LIBRT@ -lm -ldl
+-lpthread @LIBRT@ -lm
@echo " "
@echo "You may want to disable pulseaudio in Ubuntu with this command:"
@@ -1686,7 +1686,7 @@ elektor.om fcdpp.om hid.om pcie9842.om b
@SVGA64_LD@ \
@SVGAGL64_LD@ \
@LIBUDEV_64_LD@ \
--lpthread @LIBRT@ -lm -ldl
+-lpthread @LIBRT@ -lm
@echo " "
@echo "You may want to disable pulseaudio in Ubuntu with this command:"