Skip to content

gcc-8_8.3.0.3-3+rebuild 没有默认使能pie #3528

Closed
@RevySR

Description

SUMMARY | 问题概要

gcc 默认应该使能pie 但是因为发行版识别修改成uos/deepin导致默认pie消失了
所以各个项目才不得不强加-pie参数

# pie by default --------------------
with_pie :=
ifeq ($(distribution),Debian)
  ifeq (,$(filter $(distrelease),wheezy squeeze jessie))
    pie_archs = amd64 arm64 armel armhf i386 \
		mips mipsel mips64 mips64el mipsn32 mipsn32el \
		mipsr6 mipsr6el mips64r6 mips64r6el mipsn32r6 mipsn32r6el \
		ppc64el s390x sparc sparc64 kfreebsd-amd64 kfreebsd-i386 \
		hurd-i386 riscv64
  endif
  ifeq (,$(filter $(distrelease),wheezy squeeze jessie stretch))
    pie_archs += powerpc ppc64
  endif
else ifeq ($(distribution),Ubuntu)
  ifeq (,$(filter $(distrelease),lucid precise trusty utopic vivid wily))
    pie_archs = s390x
  endif
  ifeq (,$(filter $(distrelease),lucid precise trusty utopic vivid wily xenial))
    pie_archs += amd64 ppc64el
  endif
  ifeq (,$(filter $(distrelease),lucid precise trusty utopic vivid wily xenial yakkety zesty))
    pie_archs += armhf arm64 i386
  endif
  pie_archs += riscv64
endif
ifneq (,$(filter $(DEB_TARGET_ARCH),$(pie_archs)))
  with_pie := yes
endif
ifeq ($(trunk_build),yes)
  with_pie := disabled for trunk builds
endif

STEPS TO REPRODUCE | 复现步骤

dget -d https://community-packages.deepin.com/deepin/pool/main/g/gcc-8/gcc-8_8.3.0.3-3%2Brebuild.dsc
dpkg-source -x gcc-8_8.3.0.3-3%2Brebuild.dsc
cd gcc-8-8.3.0.3/debian

vim +1237 rules.defs

就可以发现没有识别uos/deepin相关的 导致default-pie丢失 与其他发行版行为不一致

OBSERVED RESULT | 观察到的结果

No response

EXPECTED RESULT | 期望的结果

No response

SOFTWARE/OS VERSIONS | 软件/系统版本信息

deepin v20.8
gcc-8_8.3.0.3-3+rebuild

ADDITIONAL INFORMATION | 额外补充

No response

Metadata

Assignees

Labels

Type

No type

Projects

  • Status

    CLOSED

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions