You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@teaclave.apache.org by GitBox <gi...@apache.org> on 2022/02/03 09:02:20 UTC

[GitHub] [incubator-teaclave] qinkunbao opened a new pull request #610: fix link scripts

qinkunbao opened a new pull request #610:
URL: https://github.com/apache/incubator-teaclave/pull/610


   ## Description
   
   As discussed in #581, every service links `Mesapy` and `WAMR` into the `enclave.so`. While most linkers avoid linking unneeded static objects, it is not true for some libraries (e.g., sgx_trts).
   
   `-Wl,-whole-archive  library-include-runtime.a -Wl,-no-whole-archive`
   
   Fixes #581
   
   ## Type of change (select or add applied and delete the others)
   
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [ ] API change with a documentation update
   - [ ] Additional test coverage
   - [ ] Code cleanup or just sync with upstream third-party crates
   
   ## How has this been tested?
   
   ## Checklist
   
   - [ ] Fork the repo and create your branch from `master`.
   - [ ] If you've added code that should be tested, add tests.
   - [ ] If you've changed APIs, update the documentation.
   - [ ] Ensure the tests pass (see CI results).
   - [ ] Make sure your code lints/format.
   


-- 
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: notifications-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave] dingelish commented on pull request #610: fix link scripts

Posted by GitBox <gi...@apache.org>.
dingelish commented on pull request #610:
URL: https://github.com/apache/incubator-teaclave/pull/610#issuecomment-1029282935


   #581 has been closed for weeks. is this still needed? anything improved since then?


-- 
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: notifications-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave] qinkunbao commented on pull request #610: fix link scripts

Posted by GitBox <gi...@apache.org>.
qinkunbao commented on pull request #610:
URL: https://github.com/apache/incubator-teaclave/pull/610#issuecomment-1032017517


   This PR seems to be a temporary solution. We will refactor the build system in the future. 


-- 
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: notifications-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave] qinkunbao closed pull request #610: fix link scripts

Posted by GitBox <gi...@apache.org>.
qinkunbao closed pull request #610:
URL: https://github.com/apache/incubator-teaclave/pull/610


   


-- 
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: notifications-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave] bigdata-memory commented on a change in pull request #610: fix link scripts

Posted by GitBox <gi...@apache.org>.
bigdata-memory commented on a change in pull request #610:
URL: https://github.com/apache/incubator-teaclave/pull/610#discussion_r799727505



##########
File path: cmake/scripts/sgx_link_sign.sh
##########
@@ -44,10 +44,25 @@ if [ ! "$LIBENCLAVE_PATH" -nt "$SIGNED_PATH" ] \
     exit 0
 fi
 
-TEACLAVE_LINK_FLAGS="-L${TEACLAVE_OUT_DIR} -lpycomponent ffi.o -lpypy-c -lsgx_tlibc_ext -lffi"
-if [ "$TEACLAVE_EXECUTOR_WAMR" == "ON" ]; then
-    TEACLAVE_LINK_FLAGS+=" -lvmlib"
-fi
+TEACLAVE_LINK_FLAGS="-L${TEACLAVE_OUT_DIR}"
+
+case $CUR_PKG_NAME in
+
+  teaclave_access_control_service_enclave | teaclave_functional_tests_enclave )
+    TEACLAVE_LINK_FLAGS+=" -lpycomponent ffi.o -lpypy-c -lsgx_tlibc_ext -lffi"
+    ;;
+
+  teaclave_execution_service_enclave | teaclave_unit_tests_enclave |  teaclave_integration_tests_enclave)
+    TEACLAVE_LINK_FLAGS+=" -lpycomponent ffi.o -lpypy-c -lsgx_tlibc_ext -lffi"
+    if [ "$TEACLAVE_EXECUTOR_WAMR" == "ON" ]; then
+        TEACLAVE_LINK_FLAGS+=" -lvmlib"
+    fi
+    ;;
+
+  *)
+    ;;

Review comment:
       may consider adding something in default branch to cover unexpected case.




-- 
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: notifications-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org