ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: [devel] I: gcc 10.2.1 with hardenings
Date: Wed, 9 Dec 2020 22:49:19 +0300
Message-ID: <20201209194919.GL503234@glebfm.cloud.tilaa.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3865 bytes --]

Всем привет!

В Сизиф отправлен gcc 10.2.1.

http://gcc.gnu.org/gcc-10/changes.html
http://gcc.gnu.org/gcc-10/porting_to.html

Помимо обновления компилятора этот релиз содержит включённые по умолчанию
опции:
* -fstack-clash-protection;
* -fPIE и -pie;
* -z now при линковке PIE.


Типичные ошибки, которые возникнут во время следующей тестовой пересборки:

1.
  /usr/bin/ld.default: CMakeFiles/genisoimage.dir/checksum.o:/usr/src/RPM/BUILD/cdrkit-1.1.11/genisoimage/genisoimage.h:379: multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:/usr/src/RPM/BUILD/cdrkit-1.1.11/genisoimage/genisoimage.h:379: first defined here

В gcc 10 по умолчанию включён -fno-common, об этом подробнее писалось
вот тут:
https://lists.altlinux.org/pipermail/devel/2020-December/212848.html

2.
  /usr/src/RPM/BUILD/aqemu-0.9.2/src/docopt/docopt_value.h:267:16: error: 'runtime_error' is not a member of 'std'

В C++ измененились зависимостей между header-ами (об этом чуть подробнее
написано на указанной выше странице porting_to).

3.
  Error: Type mismatch in argument 'a' at (1); passed TYPE(mp_realm) to TYPE(mp_real)
или
  Error: Type mismatch between actual argument at (1) and actual argument at (2) (TYPE(sidl_bool_6d)/TYPE(sidl_bool_7d)).
или
  Error: Rank mismatch in argument 'strue1' at (1) (scalar and rank-1)

Новый компилятор языка fortran лучше соответствует стандарту и
не принимает аргументы другого типа (об этом чуть подробнее написано на
указанной выше странице porting_to).

4.
  pgbutton.cpp:105:8: error: narrowing conversion of 'PG_Button::OK' from 'unsigned int' to 'int' [-Wnarrowing]
    105 |   case OK:

Narrowing (cужение?) типов теперь диагностируется и в значениях case.

5.
  verify-elf: ERROR: ./usr/bin/burnP5: TEXTREL entry found: 0x00000000
или
  /usr/bin/ld.default: ../generated/build.o: relocation R_X86_64_32 against symbol `__dmd_personality_v0' can not be used when making a PIE object; recompile with -fPIE

Эти пакеты компилируют объектные файлы, которые потом нельзя
слинковать (нормально или совсем) в PIE.

Список таких пакетов:
cpuburn-1.4-alt5.qa1	ldv
dmd-2.094.0-alt3	darktemplar @everybody
dub-1.23.0-alt1	darktemplar @everybody
mjpegtools-2.1.0-alt3	rider @everybody
onedrive-2.4.7-alt1	lav @everybody
util-linux-2.35.2-alt2	legion boyarsh

6.
  /usr/bin/ld.default: /usr/lib64/ocaml/libasmrun.a(startup_aux_n.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE

Эти пакеты пытаются линковаться со статическими библиотеками из
репозитория, собранными без -fPIC или -fPIE.

Количество клиентов по библиотекам:
    107 /usr/lib64/ocaml/lib{asm,caml}run.a
      2 /usr/lib64/libpgcommon.a
      1 /usr/lib64/libudis86.a
      1 /usr/lib64/libtg_owt.a
      1 /usr/lib64/libI2util.a
      1 /usr/lib64/libgsoapssl++.a
      1 /usr/lib64/libflam3.a
      1 /usr/lib64/libboost_filesystem.a

Cкорее всего можно просто пересобрать эти библиотеки, они по умолчанию
соберутся с -fPIE.

Enjoy!

-- 
glebfm

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

                 reply	other threads:[~2020-12-09 19:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201209194919.GL503234@glebfm.cloud.tilaa.com \
    --to=glebfm@altlinux.org \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git