-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[WIP - Do not merge] Alpine Linux Port #2262
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,11 @@ elseif(CLR_CMAKE_PLATFORM_ARCH_ARM64) | |
| return() | ||
| endif() | ||
|
|
||
| if(CLR_CMAKE_PLATFORM_LINUX_ALPINE) | ||
| message(WARNING "lldb is not supported on Alpine Linux yet") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand conditions against few of few hundreds of Linux distributions...
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure the best way forward, guess either just make it optional everywhere or have a nolldb parameter to build.sh . Just wanted to move forward. |
||
| return() | ||
| endif() | ||
|
|
||
| set(ENABLE_LLDBPLUGIN ${CLR_CMAKE_PLATFORM_UNIX} CACHE BOOL "Enable building the SOS plugin for LLDB.") | ||
| set(REQUIRE_LLDBPLUGIN ${CLR_CMAKE_PLATFORM_LINUX} CACHE BOOL "Require building the SOS plugin for LLDB.") | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 2.8.12.2) | |
|
|
||
| project(COREPAL) | ||
|
|
||
| set(PAL_CMAKE_ENABLE_TRACE 0) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you disabling it for everybody?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't have a good way to toggle this. |
||
|
|
||
| include_directories(${COREPAL_SOURCE_DIR}/inc) | ||
| include_directories(${COREPAL_SOURCE_DIR}/src) | ||
| include_directories(${COREPAL_SOURCE_DIR}/../inc) | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -57,8 +57,10 @@ Module Name: | |||
| #include <sys/types.h> | ||||
| #include <sys/mman.h> | ||||
|
|
||||
| #if defined(__LINUX__) | ||||
| #if defined(__LINUX__) && defined(__GLIBC__) | ||||
| #include <gnu/lib-names.h> | ||||
| #else | ||||
| #define LIBC_SO "libc.so" | ||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you really want to define it for NetBSD? coreclr/src/pal/src/loader/module.cpp Line 1625 in 49f39af
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was a quick change to get it working, not sure of the correct path forward. |
||||
| #endif | ||||
|
|
||||
| using namespace CorUnix; | ||||
|
|
||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,11 @@ | |
| #ifndef _INC_INTERNAL_SECURECRT | ||
| #define _INC_INTERNAL_SECURECRT | ||
|
|
||
| typedef unsigned long __uint64_t; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is asking for breakage. |
||
| typedef signed long __int64_t; | ||
| typedef __int64_t int64_t; | ||
| typedef __uint64_t uint64_t; | ||
|
|
||
| /* more VS specific goodness */ | ||
| #define __out_ecount_z( x ) | ||
| #define __out_ecount( x ) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ | |
| //typedef __int64_t __int64; | ||
|
|
||
|
|
||
| #define __GNUC_VA_LIST | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you define it via CMake? It looks wrong here. |
||
| #define FORMAT_VALIDATIONS | ||
|
|
||
| typedef double _CRT_DOUBLE; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,7 @@ | |
| ****/ | ||
|
|
||
| #define _SAFECRT_IMPL | ||
| #define __GNUC_VA_LIST | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you define it via CMake? It looks wrong here. |
||
|
|
||
| #define __STDC_LIMIT_MACROS | ||
| #include "pal/palinternal.h" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -422,7 +422,7 @@ void CONTEXTToNativeContext(CONST CONTEXT *lpContext, native_context_t *native) | |
|
|
||
| if ((lpContext->ContextFlags & CONTEXT_FLOATING_POINT) == CONTEXT_FLOATING_POINT) | ||
| { | ||
| #ifdef _AMD64_ | ||
| #if 0 //_AMD64_ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why for everybody?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need a suitable CMake test. |
||
| FPREG_ControlWord(native) = lpContext->FltSave.ControlWord; | ||
| FPREG_StatusWord(native) = lpContext->FltSave.StatusWord; | ||
| FPREG_TagWord(native) = lpContext->FltSave.TagWord; | ||
|
|
@@ -481,7 +481,7 @@ void CONTEXTFromNativeContext(const native_context_t *native, LPCONTEXT lpContex | |
|
|
||
| if ((contextFlags & CONTEXT_FLOATING_POINT) == CONTEXT_FLOATING_POINT) | ||
| { | ||
| #ifdef _AMD64_ | ||
| #if 0//def _AMD64_ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why for everybody?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code is generally a quick hack to run on Alpine, as I said. I don't On Fri, 12 Feb 2016, 11:24 Kamil Rytarowski notifications@github.com
|
||
| lpContext->FltSave.ControlWord = FPREG_ControlWord(native); | ||
| lpContext->FltSave.StatusWord = FPREG_StatusWord(native); | ||
| lpContext->FltSave.TagWord = FPREG_TagWord(native); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? It doesn't look correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't intend to commit that, reducing my own build time while getting PAL working.