Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable building with gcc-14 #101623

Merged
merged 5 commits into from May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/nativeSanitizers.targets
Expand Up @@ -12,7 +12,7 @@
<PropertyGroup Condition="'$(TargetArchitecture)' == 'arm64'">
<LLVMArchitectureSuffix>arm64</LLVMArchitectureSuffix>
</PropertyGroup>
<ItemGroup Condition="'$(TargetOS)' != 'windows'">
<ItemGroup Condition="'$(TargetOS)' != 'windows' and '$(EnableNativeSanitizers)' != ''">
<LinkerArg Include="-fsanitize=$(EnableNativeSanitizers)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetOS)' == 'osx'">
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/common/platform-matrix.yml
Expand Up @@ -326,7 +326,7 @@ jobs:
targetRid: linux-x64
platform: linux_x64
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
container: debian-12-gcc13-amd64
container: debian-12-gcc14-amd64
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
buildConfig: ${{ parameters.buildConfig }}
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/common/templates/pipeline-with-resources.yml
Expand Up @@ -93,8 +93,8 @@ extends:
env:
ROOTFS_DIR: /crossrootfs/riscv64

debian-12-gcc13-amd64:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc13-amd64
debian-12-gcc14-amd64:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc14-amd64

linux_x64_llvmaot:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/inc/corhlprpriv.h
Expand Up @@ -474,12 +474,12 @@ template <class T> class CQuickArrayBase : public CQuickBytesBase
template <class T> class CQuickArray : public CQuickArrayBase<T>
{
public:
CQuickArray<T>()
CQuickArray()
{
this->Init();
}

~CQuickArray<T>()
~CQuickArray()
{
this->Destroy();
}
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/inc/utilcode.h
Expand Up @@ -845,7 +845,7 @@ template<typename T>
class SimpleListNode
{
public:
SimpleListNode<T>(const T& _t)
SimpleListNode(const T& _t)
{
data = _t;
next = 0;
Expand All @@ -861,7 +861,7 @@ class SimpleList
public:
typedef SimpleListNode<T> NodeType;

SimpleList<T>()
SimpleList()
{
head = NULL;
}
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/nativeaot/Runtime/unix/UnwindHelpers.cpp
Expand Up @@ -777,7 +777,7 @@ libunwind::v128 Registers_REGDISPLAY::getVectorRegister(int num) const
{
num -= UNW_ARM64_D8;

if (num < 0 || num >= sizeof(D) / sizeof(uint64_t))
if (num < 0 || (size_t)num >= sizeof(D) / sizeof(uint64_t))
{
PORTABILITY_ASSERT("unsupported arm64 vector register");
}
Expand All @@ -796,7 +796,7 @@ void Registers_REGDISPLAY::setVectorRegister(int num, libunwind::v128 value)
{
num -= UNW_ARM64_D8;

if (num < 0 || num >= sizeof(D) / sizeof(uint64_t))
if (num < 0 || (size_t)num >= sizeof(D) / sizeof(uint64_t))
{
PORTABILITY_ASSERT("unsupported arm64 vector register");
}
Expand Down
5 changes: 3 additions & 2 deletions src/coreclr/pal/inc/pal.h
Expand Up @@ -3371,8 +3371,9 @@ EXTERN_C PALIMPORT inline RETURN_TYPE PALAPI METHOD_DECL \
/* Function multiversioning will never inline a method that is \
marked such. However, just to make sure that we don't see \
surprises, explicitely mark them as noinline. */ \
__attribute__((target("lse"))) __attribute__((noinline)) \
EXTERN_C PALIMPORT inline RETURN_TYPE PALAPI Lse_##METHOD_DECL \
EXTERN_C PALIMPORT inline RETURN_TYPE PALAPI \
__attribute__((target("+lse"))) __attribute__((noinline)) \
Lse_##METHOD_DECL \
{ \
return INTRINSIC_NAME; \
} \
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/unwinder/arm64/unwinder.cpp
Expand Up @@ -794,7 +794,7 @@ RtlpExpandCompactToFull (
// or registers to lave left.
//

for (intreg = 0; intreg < ((fnent_pdata->RegI / 2) * 2); intreg += 2) {
for (intreg = 0; intreg < (ULONG)((fnent_pdata->RegI / 2) * 2); intreg += 2) {
if (!sav_predec_done) {
DBG_OP("save_regp_x\t(%s, %s, %i)\n", int_reg_names[intreg], int_reg_names[intreg + 1], -savsz * 8);
emit_save_regp_x(&op_buffer, intreg, -savsz * 8);
Expand Down Expand Up @@ -1484,7 +1484,7 @@ Return Value:
Fpcr = MEMORY_READ_DWORD(UnwindParams, SourceAddress);
SourceAddress = VfpStateAddress + FIELD_OFFSET(KARM64_VFP_STATE, Fpsr);
Fpsr = MEMORY_READ_DWORD(UnwindParams, SourceAddress);
if (Fpcr != -1 && Fpsr != -1) {
if (Fpcr != (ULONG)-1 && Fpsr != (ULONG)-1) {

ContextRecord->Fpcr = Fpcr;
ContextRecord->Fpsr = Fpsr;
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/field.h
Expand Up @@ -186,7 +186,7 @@ class FieldDesc
// As of 4/11/2012 I could repro this by turning on the COMPLUS log and
// the LOG() at line methodtablebuilder.cpp:7845
// MethodTableBuilder::PlaceRegularStaticFields() calls GetOffset()
if((DWORD)(DWORD_PTR&)m_pMTOfEnclosingClass > 16)
if((DWORD)reinterpret_cast<DWORD_PTR&>(m_pMTOfEnclosingClass) > 16)
{
_ASSERTE(!this->IsRVA() || (m_dwOffset == OutOfLine_BigRVAOffset()));
}
Expand Down