Skip to content

Commit 195b55c

Browse files
am11Ruihan-Yin
authored andcommitted
Enable building with gcc-14 (dotnet#101623)
1 parent 8f988fd commit 195b55c

File tree

9 files changed

+16
-15
lines changed

9 files changed

+16
-15
lines changed

eng/nativeSanitizers.targets

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<PropertyGroup Condition="'$(TargetArchitecture)' == 'arm64'">
1313
<LLVMArchitectureSuffix>arm64</LLVMArchitectureSuffix>
1414
</PropertyGroup>
15-
<ItemGroup Condition="'$(TargetOS)' != 'windows'">
15+
<ItemGroup Condition="'$(TargetOS)' != 'windows' and '$(EnableNativeSanitizers)' != ''">
1616
<LinkerArg Include="-fsanitize=$(EnableNativeSanitizers)" />
1717
</ItemGroup>
1818
<ItemGroup Condition="'$(TargetOS)' == 'osx'">

eng/pipelines/common/platform-matrix.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ jobs:
326326
targetRid: linux-x64
327327
platform: linux_x64
328328
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
329-
container: debian-12-gcc13-amd64
329+
container: debian-12-gcc14-amd64
330330
jobParameters:
331331
runtimeFlavor: ${{ parameters.runtimeFlavor }}
332332
buildConfig: ${{ parameters.buildConfig }}

eng/pipelines/common/templates/pipeline-with-resources.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ extends:
9393
env:
9494
ROOTFS_DIR: /crossrootfs/riscv64
9595

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

9999
linux_x64_llvmaot:
100100
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8

src/coreclr/inc/corhlprpriv.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -474,12 +474,12 @@ template <class T> class CQuickArrayBase : public CQuickBytesBase
474474
template <class T> class CQuickArray : public CQuickArrayBase<T>
475475
{
476476
public:
477-
CQuickArray<T>()
477+
CQuickArray()
478478
{
479479
this->Init();
480480
}
481481

482-
~CQuickArray<T>()
482+
~CQuickArray()
483483
{
484484
this->Destroy();
485485
}

src/coreclr/inc/utilcode.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ template<typename T>
845845
class SimpleListNode
846846
{
847847
public:
848-
SimpleListNode<T>(const T& _t)
848+
SimpleListNode(const T& _t)
849849
{
850850
data = _t;
851851
next = 0;
@@ -861,7 +861,7 @@ class SimpleList
861861
public:
862862
typedef SimpleListNode<T> NodeType;
863863

864-
SimpleList<T>()
864+
SimpleList()
865865
{
866866
head = NULL;
867867
}

src/coreclr/nativeaot/Runtime/unix/UnwindHelpers.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ libunwind::v128 Registers_REGDISPLAY::getVectorRegister(int num) const
777777
{
778778
num -= UNW_ARM64_D8;
779779

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

799-
if (num < 0 || num >= sizeof(D) / sizeof(uint64_t))
799+
if (num < 0 || (size_t)num >= sizeof(D) / sizeof(uint64_t))
800800
{
801801
PORTABILITY_ASSERT("unsupported arm64 vector register");
802802
}

src/coreclr/pal/inc/pal.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -3371,8 +3371,9 @@ EXTERN_C PALIMPORT inline RETURN_TYPE PALAPI METHOD_DECL \
33713371
/* Function multiversioning will never inline a method that is \
33723372
marked such. However, just to make sure that we don't see \
33733373
surprises, explicitely mark them as noinline. */ \
3374-
__attribute__((target("lse"))) __attribute__((noinline)) \
3375-
EXTERN_C PALIMPORT inline RETURN_TYPE PALAPI Lse_##METHOD_DECL \
3374+
EXTERN_C PALIMPORT inline RETURN_TYPE PALAPI \
3375+
__attribute__((target("+lse"))) __attribute__((noinline)) \
3376+
Lse_##METHOD_DECL \
33763377
{ \
33773378
return INTRINSIC_NAME; \
33783379
} \

src/coreclr/unwinder/arm64/unwinder.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ RtlpExpandCompactToFull (
794794
// or registers to lave left.
795795
//
796796

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

14891489
ContextRecord->Fpcr = Fpcr;
14901490
ContextRecord->Fpsr = Fpsr;

src/coreclr/vm/field.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class FieldDesc
186186
// As of 4/11/2012 I could repro this by turning on the COMPLUS log and
187187
// the LOG() at line methodtablebuilder.cpp:7845
188188
// MethodTableBuilder::PlaceRegularStaticFields() calls GetOffset()
189-
if((DWORD)(DWORD_PTR&)m_pMTOfEnclosingClass > 16)
189+
if((DWORD)reinterpret_cast<DWORD_PTR&>(m_pMTOfEnclosingClass) > 16)
190190
{
191191
_ASSERTE(!this->IsRVA() || (m_dwOffset == OutOfLine_BigRVAOffset()));
192192
}

0 commit comments

Comments
 (0)