Skip to content

Commit

Permalink
fix(CMSIS): Declare libc function stubs as weak (#1029)
Browse files Browse the repository at this point in the history
Signed-off-by: Maureen Helm <[email protected]>
  • Loading branch information
MaureenHelm authored Jun 3, 2024
1 parent 601c5e3 commit 2e450ed
Show file tree
Hide file tree
Showing 22 changed files with 44 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ uint32_t SystemCoreClock = IPO_FREQ; // Part defaults to IPO on startup
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ The libc implementation from GCC 11+ depends on _getpid and _kill in some places
There is no concept of processes/PIDs in the baremetal PeriphDrivers, therefore
we implement stub functions that return an error code to resolve linker warnings.
*/
int _getpid(void)
__weak int _getpid(void)
{
return E_NOT_SUPPORTED;
}

int _kill(void)
__weak int _kill(void)
{
return E_NOT_SUPPORTED;
}
Expand Down

0 comments on commit 2e450ed

Please sign in to comment.