~vcs-imports/ipfire/ipfire-2.x

« back to all changes in this revision

Viewing changes to lfs/gcc

  • Committer: Peter Müller
  • Date: 2022-04-23 14:27:56 UTC
  • mto: This revision was merged to the branch mainline in revision 9750.
  • Revision ID: git-v1:7a981d94cb2c3e48ecaf07c506c8353a2c839d79
SSH: do not send spoofable TCP keep alive messages

By default, both SSH server and client rely on TCP-based keep alive
messages to detect broken sessions, which can be spoofed rather easily
in order to keep a broken session opened (and vice versa).

Since we rely on SSH-based keep alive messages, which are not vulnerable
to this kind of tampering, there is no need to double-check connections
via TCP keep alive as well.

This patch thereof disables using TCP keep alive for both SSH client and
server scenario. For usability reasons, a timeout of 5 minutes (10
seconds * 30 keep alive messages = 300 seconds) will be used for both
client and server configuration, as 60 seconds were found to be too
short for unstable connectivity scenarios.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
include Config
26
26
 
27
 
VER        = 13.2.0
 
27
VER        = 11.1.0
28
28
 
29
29
GMP_VER    = 6.2.1
30
 
MPFR_VER   = 4.2.0
31
 
MPC_VER    = 1.3.1
 
30
MPFR_VER   = 4.1.0
 
31
MPC_VER    = 1.2.1
32
32
 
33
33
THISAPP    = gcc-$(VER)
34
34
DL_FILE    = $(THISAPP).tar.xz
50
50
 
51
51
CXXFLAGS  := $(CFLAGS)
52
52
 
 
53
ifeq "$(BUILD_ARCH)" "armv7hl"
 
54
        FULL_BOOTSTRAP = 1
 
55
endif
 
56
 
 
57
ifeq "$(BUILD_ARCH)" "armv6l"
 
58
        FULL_BOOTSTRAP = 1
 
59
endif
 
60
 
53
61
# Normal build or $(TOOLS_DIR) build.
54
62
#
55
63
ifeq "$(ROOT)" ""
66
74
        --disable-nls
67
75
  EXTRA_MAKE =
68
76
  EXTRA_INSTALL =
69
 
ifeq "$(PASS)" "A"
70
 
  TARGET = $(DIR_INFO)/$(THISAPP)-libatomic
71
 
endif
72
77
else
73
78
ifeq "$(PASS)" "1"
74
79
  TARGET = $(DIR_INFO)/$(THISAPP)-tools1
116
121
        --prefix=$(TOOLS_DIR) \
117
122
        --with-local-prefix=$(TOOLS_DIR) \
118
123
        --with-native-system-header-dir=$(TOOLS_DIR)/include \
119
 
        --disable-bootstrap \
120
124
        --enable-languages=c,c++ \
121
125
        --disable-libstdcxx-pch \
122
126
        --disable-multilib \
123
127
        --disable-libgomp
124
128
  EXTRA_MAKE =
125
129
  EXTRA_INSTALL =
 
130
 
 
131
  ifeq "$(FULL_BOOTSTRAP)" "1"
 
132
        EXTRA_CONFIG += --enable-bootstrap
 
133
  else
 
134
        EXTRA_CONFIG += --disable-bootstrap
 
135
  endif
126
136
else
127
137
  # PASS=L # libstdc++-v3
128
138
  TARGET = $(DIR_INFO)/$(THISAPP)-libstdc++
150
160
                --enable-standard-branch-protection
151
161
endif
152
162
 
 
163
ifeq "$(BUILD_ARCH)" "armv7hl"
 
164
        EXTRA_CONFIG += \
 
165
                --with-float=hard
 
166
endif
 
167
 
 
168
ifeq "$(BUILD_ARCH)" "armv6l"
 
169
        EXTRA_CONFIG += \
 
170
                --with-arch=armv6zk+fp \
 
171
                --with-float=softfp
 
172
#               --disable-sjlj-exceptions
 
173
endif
 
174
 
153
175
ifeq "$(BUILD_ARCH)" "riscv64"
154
176
        EXTRA_CONFIG += \
155
177
                --with-arch=rv64gc \
179
201
mpfr-$(MPFR_VER).tar.xz = $(DL_FROM)/mpfr-$(MPFR_VER).tar.xz
180
202
mpc-$(MPC_VER).tar.gz = $(DL_FROM)/mpc-$(MPC_VER).tar.gz
181
203
 
182
 
$(DL_FILE)_BLAKE2 = 0034b29d3d6cc05821f0c4253ce077805943aff7b370729dd203bda57d89c107edd657eeddc2fb1e69ea15c7b0323b961f46516c7f4af89a3ccf7fea84701be2
 
204
$(DL_FILE)_BLAKE2 = fe617e776b0270d11adea21b5c37d889de90865c19ab82d1c37bbd5c5b9c583a98c174606c4f893ca4950a4233e2a58aae93ad6aa7ad33d4e78a31c72371c1ed
183
205
gmp-$(GMP_VER).tar.xz_BLAKE2    = c0d85f175392a50cfa01bc6b0a312b235946ad8b4f6f84f6dabd33d7a6f2cc75c9b0e1e33057be07750bfa0145b7c4cf3b6188a5be6ca9d7271ec2276c84ebcb
184
 
mpfr-$(MPFR_VER).tar.xz_BLAKE2  = dd88ae3a6a910ad8faeb791b49c3b1085de5d0d4c49c637c124bf4d9bc79fb621d0d1d69e07d0642b9b678f6d355a5830d083dfd189e1e91d0e04c970c10bd64
185
 
mpc-$(MPC_VER).tar.gz_BLAKE2    = 76434e6f8830af3571836d51576bfebbc9701e9bbb5c4686f134081cd96cd90ae02f7ff42bf9e3957c7a7ba92b6b2d9cdabe18f0269271147521cd7f6a2d551c
 
206
mpfr-$(MPFR_VER).tar.xz_BLAKE2  = 41d1be0c4b557760f12a4525ad3a84b6e2cd6f0927c935fcfba577ac0490e582d1ae4b581dce58e21e705cf9d7c88373054d7fb7a94bb32c69b339f99a25dc68
 
207
mpc-$(MPC_VER).tar.gz_BLAKE2    = 9cd03c6a71839e4cdb3c1f18d718cc4d3097c3f8ec307a5c756bd5df27c68aa013755156b3b156efee1acabfee2269602c6a3a358092ef0d522271c9c56c133d
186
208
 
187
209
install : $(TARGET)
188
210
 
212
234
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
213
235
        @$(PREBUILD)
214
236
        @rm -rf $(DIR_APP) $(DIR_SRC)/gcc-build && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
215
 
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc/gcc-13.1.0-riscv_use_log2_from_cheader_without_namespace.patch
 
237
 
 
238
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc/gcc.git-745dae5-remove_cyclades.patch
 
239
 
216
240
 
217
241
        @mkdir $(DIR_SRC)/gcc-build
218
242
 
256
280
                        $(EXTRA_CONFIG)
257
281
        cd $(DIR_SRC)/gcc-build && make $(EXTRA_MAKE)
258
282
        cd $(DIR_SRC)/gcc-build && make $(EXTRA_INSTALL) install
259
 
else
260
 
ifeq "$(PASS)" "A"
261
 
        # libatomic pass
262
 
        cd $(DIR_SRC)/gcc-build && \
263
 
                $(EXTRA_ENV) \
264
 
                $(DIR_APP)/libatomic/configure \
265
 
                        $(EXTRA_CONFIG)
266
 
        cd $(DIR_SRC)/gcc-build && make $(EXTRA_MAKE)
267
 
        cd $(DIR_SRC)/gcc-build && make $(EXTRA_INSTALL) install
 
283
 
268
284
else
269
285
        # The actual build.
270
286
        cd $(DIR_SRC)/gcc-build && \
274
290
        cd $(DIR_SRC)/gcc-build && make $(EXTRA_MAKE) $(MAKETUNING)
275
291
        cd $(DIR_SRC)/gcc-build && make $(EXTRA_INSTALL) install
276
292
endif
277
 
endif
278
293
 
279
294
ifeq "$(TOOLCHAIN)" "1"
280
295
 ifeq "$(PASS)" "1"