Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Coreclr gnuport #22129

Merged
merged 12 commits into from
Feb 1, 2019
Merged

Coreclr gnuport #22129

merged 12 commits into from
Feb 1, 2019

Commits on Jan 22, 2019

  1. Abstract away NOINLINE statement

    MSVC and GNU compilers use different attributes for noinline.
    Abstract away compiler differences.
    franksinankaya authored and Sinan Kaya committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    6befc40 View commit details
    Browse the repository at this point in the history
  2. Define CDECL for GNUC

    __cdecl is not defined by default on GNU compilers.
    franksinankaya authored and Sinan Kaya committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    12582d3 View commit details
    Browse the repository at this point in the history
  3. Replace __sync_swap with __atomic_exchange_n

    __sync_swap doesn't exist on GNU. Replacing with __atomic_exchange_n
    which is universally available.
    franksinankaya authored and Sinan Kaya committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    1c9f923 View commit details
    Browse the repository at this point in the history
  4. Define gcc version of __declspec(thread)

    franksinankaya authored and Sinan Kaya committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    df20217 View commit details
    Browse the repository at this point in the history
  5. Correct pointer casting

    A pointer value is usually unsigned long on most platforms.
    Casting it to integer causes signedness issues. Use size_t
    to be efficient on all 32 and 64 bit architectures.
    franksinankaya authored and Sinan Kaya committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    88129ee View commit details
    Browse the repository at this point in the history
  6. Put quotes around the error string

    Correct error statement. GNU G++ is picky about the string
    following the error statement with ' character in it. It needs
    to be enclosed with double quotes.
    franksinankaya authored and Sinan Kaya committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    6a5e36c View commit details
    Browse the repository at this point in the history
  7. Fix casting problem

    Seeing these warnings with GNU G++ compiler
    
    src/pal/src/sync/cs.cpp: In function ‘void CorUnix::InternalInitializeCriticalSectionAndSpinCount(PCRITICAL_SECTION, DWORD, bool)’:
    src/pal/src/sync/cs.cpp:630:48: warning: converting to non-pointer type ‘SIZE_T {aka long unsigned int}’ from NULL [-Wconversion-null]
             pPalCriticalSection->OwningThread      = NULL;
                                                    ^
    src/pal/src/sync/cs.cpp: In function ‘void CorUnix::InternalLeaveCriticalSection(CorUnix::CPalThread*, _CRITICAL_SECTION*)’:
    src/pal/src/sync/cs.cpp:880:43: warning: converting to non-pointer type ‘SIZE_T {aka long unsigned int}’ from NULL [-Wconversion-null]
             pPalCriticalSection->OwningThread = NULL;
                                               ^
    franksinankaya authored and Sinan Kaya committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    bc0f6f3 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2019

  1. Abstract optnone compiler attribute

    GNU compiler doesn't support optnone attribute.
    
    pal/src/exception/seh-unwind.cpp:449:77: warning: ‘optnone’ attribute directive ignored [-Wattributes]
    franksinankaya committed Jan 30, 2019
    Configuration menu
    Copy the full SHA
    ddf89fa View commit details
    Browse the repository at this point in the history
  2. Set the aligned attribute for GNU compiler

    Sinan Kaya authored and franksinankaya committed Jan 30, 2019
    Configuration menu
    Copy the full SHA
    42a8d7c View commit details
    Browse the repository at this point in the history
  3. Make __rotl and __rotr functions portable

    GNU compiler doesn't have an intrinsic for these. Open code them
    using the provided implementation.
    franksinankaya committed Jan 30, 2019
    Configuration menu
    Copy the full SHA
    aa6c7ef View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0f324d6 View commit details
    Browse the repository at this point in the history
  5. Add throw specifier for GCC

    /usr/include/string.h:43:28: error: declaration of ‘void* memcpy(void*, const void*, size_t) throw ()’ has a different exception specifier
            size_t __n) __THROW __nonnull ((1, 2));
    franksinankaya committed Jan 30, 2019
    Configuration menu
    Copy the full SHA
    657f85b View commit details
    Browse the repository at this point in the history