Files
bpfire/lfs/mpfr
Adolf Belka 1f26a78259 mpfr: Update to version 4.2.0p12
- Update from version 4.2.0p9 to 4.2.0p12
- Update of rootfile not required
- Changelog - additional patches from 10 to 12 over previous update
    10 - GCC 12 emits a spurious "may be used uninitialized" warning on tests/tfpif.c
         with -O1, and GCC 13 has the same issue also with -O2 (GCC bug 106155). This can
         make some test scripts fail for the developers. The gcc-pr106155-workaround
         patch provides a workaround for this bug in GCC.
         Corresponding changeset in the 4.2 branch: c0031f1af.
    11 - The mpfr_inp_str function does not handle the '\0' character correctly when it
         is not a whitespace character (which is almost always the case in practice, or
         really always the case). For instance, if the word is the sequence
         { '1', '\0', '2' }, the string "1" is passed to mpfr_set_str because '\0' is
         regarded as a terminating null character, and one gets a valid number (1) while
         '\0' in a word is necessarily invalid. This is fixed by the inp_str-nullchar
         patch. The testcase in the repository cannot be provided in the patch because of
         the null character in one of the files.
         Corresponding changeset in the 4.2 branch: 6a68387b2.
    12 - When '\0' is a whitespace character, i.e. when isspace(0) is true in the current
         locale (as allowed by ISO C for non-"C" locales), the mpfr_strtofr function
         regards a '\0' in the leading whitespace sequence as a whitespace. This is
         incorrect, since from the definition of a string, the first '\0' is the
         terminating null character (before the notion of whitespace is involved). In
         such locales, this is a vulnerability, because characters after the terminating
         null character are read to determine the result; however, such locales are rare
         or nonexistent (Mutt's lib.h suggests that some systems have such locales, but
         this was in 1998). This is fixed by the strtofr-nullchar patch.
         Corresponding changeset in the 4.2 branch: 964fbaa31.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-07-31 09:20:09 +00:00

81 lines
3.3 KiB
Plaintext

###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2023 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
VER = 4.2.0
THISAPP = mpfr-$(VER)
DL_FILE = $(THISAPP).tar.xz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_BLAKE2 = dd88ae3a6a910ad8faeb791b49c3b1085de5d0d4c49c637c124bf4d9bc79fb621d0d1d69e07d0642b9b678f6d355a5830d083dfd189e1e91d0e04c970c10bd64
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
b2 : $(subst %,%_BLAKE2,$(objects))
###############################################################################
# Downloading, checking, b2sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_BLAKE2,$(objects)) :
@$(B2SUM)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/mpfr-4.2.0-cumulative-patches-1-to-12.patch
cd $(DIR_APP) && $(CONFIGURE_ARGS) ./configure \
--prefix=/usr \
--enable-thread-safe
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
@rm -rf $(DIR_APP)
@$(POSTBUILD)