Skip to content

Commit

Permalink
GN: Fix the Mac build (project-chip#2102)
Browse files Browse the repository at this point in the history
* GN: Fix the Mac build

* Enable more debug printing in Silicon Labs code (project-chip#2087)

* [nrf5] Repair the newlib locking (project-chip#2100)

* [nrf5] Repair the newlib locking

Calling stdio functions in certain circumstances currently crashes the
device. Enabling configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES makes this
more likely to happen.

The problem is that the types used in FreeRTOSNewlibLockSupport.c don't
match those used by newlib; we're mixing up struct __lock * with its
content.

Fix the implementation and remove all the typecasts. Note that we need a
2nd allocation for the dynamic case as FreeRTOS and newlib APIs don't
match up well.

Possibly we should remove this code, but for now just repair it.

fixes project-chip#2084

* Add include paths to automake

* Sync pigweed & fix build resulting build errors

Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
mspang and bzbarsky-apple authored Aug 13, 2020
1 parent c1ff7f9 commit bcb7b5c
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
url = https://pigweed.googlesource.com/pigweed/pigweed
branch = master
ignore = dirty
commit = ab1851d75e981378fc2bfe99855a2f7c8a887086
commit = df0efba5a71d27047fc85238ae5389c0a1496558
[submodule "openthread"]
path = third_party/openthread/repo
url = https://github.com/openthread/openthread.git
Expand Down
6 changes: 4 additions & 2 deletions gn/build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,13 @@ config("optimize_default") {
}

config("disabled_warnings") {
cflags = [ "-Wno-deprecated-declarations" ]
cflags = [
"-Wno-deprecated-declarations",
"-Wno-unknown-warning-option",
]
cflags_cc = [
"-Wno-non-virtual-dtor",
"-Wno-deprecated-copy",
"-Wno-unknown-warning-option",
]
if (!is_clang) {
cflags += [
Expand Down
2 changes: 1 addition & 1 deletion gn/build/toolchain/gcc_toolchain.gni
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ template("gcc_toolchain") {
}

is_host_toolchain = invoker_toolchain_args.current_os == host_os
link_group = true
link_group = invoker_toolchain_args.current_os != "mac"

defaults = {
forward_variables_from(invoker_toolchain_args, "*")
Expand Down
4 changes: 2 additions & 2 deletions gn/chip/chip_test.gni
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ template("chip_test") {
script = "$dir_pw_unit_test/py/pw_unit_test/test_runner.py"
args = [
"--runner",
pw_unit_test_AUTOMATIC_RUNNER,
rebase_path(pw_unit_test_AUTOMATIC_RUNNER, root_build_dir),
"--test",
get_path_info("$_test_output_dir:$_test_name", "abspath"),
rebase_path("$_test_output_dir/$_test_name", root_build_dir),
]
stamp = true
}
Expand Down
8 changes: 2 additions & 6 deletions src/app/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,11 @@ static_library("common") {
public_configs = [ ":app_config" ]
}

static_library("chip") {
output_name = "libCHIPDataModel"

group("chip") {
public_deps = [ ":common" ]
}

static_library("mock") {
output_name = "libCHIPDataModelMock"

group("mock") {
public_deps = [ ":common" ]
}

Expand Down
2 changes: 1 addition & 1 deletion third_party/lwip/lwip.gni
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ declare_args() {
lwip_ethernet = lwip_default

# Enable SLIP interface support in lwIP.
lwip_slip = lwip_default
lwip_slip = false

# Enable 6LoWPAN support in lwIP.
lwip_6lowpan = lwip_default
Expand Down
2 changes: 1 addition & 1 deletion third_party/pigweed/repo
Submodule repo updated from ab1851 to df0efb

0 comments on commit bcb7b5c

Please sign in to comment.