nickva commented on issue #4448:
URL: https://github.com/apache/couchdb/issues/4448#issuecomment-2021869435
@joaohf very interesting, I don't know much about Yocto project, so may not
be able to help much with the diff.
I did however apply this patch to make it easier for you a bit:
```diff
- {"CFLAGS", "-flto -g -Wall -D_GNU_SOURCE -DCONFIG_LTO=y -O2 -Iquickjs"},
- {"LDFLAGS", "-flto -lm quickjs/libquickjs.lto.a"},
+ {"CFLAGS", "$CFLAGS -flto -g -Wall -D_GNU_SOURCE -DCONFIG_LTO=y -O2
-Iquickjs"},
+ {"LDFLAGS", "$LDFLAGS -flto -lm quickjs/libquickjs.lto.a"},
```
It seems to work on macos and debian so far with it.
I can see `AR?=`, `CC?=` patch for `quickjs/Makefile` being useful in
general too but I haven't applied the patch yet.
I tried this patch to `build_js.escript` but it didn't work as the path
where `build_js.escript` runs in a level above `qjsc` so it doesn't find just
`qjsc` using `os:cmd` it must be added to the PATH somehow in Yocto?
```diff
- os:cmd("quickjs/qjsc -c -N bytecode -o c_src/" ++ Tmp ++ " priv/" ++
Js),
+ os:cmd("qjsc -c -N bytecode -o c_src/" ++ Tmp ++ " priv/" ++ Js),
```
While at it I also rebased the QuickJS on the latest master
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]