Skip to content

Commit 56a664a

Browse files
mergify[bot]AmronosNarukara
authored
Remove atomic patch (backport #329) (#332)
(cherry picked from commit a5bf105) Co-authored-by: Aarav Gupta <aarav@spikonado.com> Co-authored-by: Narukara <narukara17@gmail.com>
1 parent 576f039 commit 56a664a

2 files changed

Lines changed: 2 additions & 45 deletions

File tree

colcon.meta

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"-DENABLE_TESTING=OFF",
1818
"-DRCUTILS_NO_FILESYSTEM=ON",
1919
"-DRCUTILS_NO_THREAD_SUPPORT=ON",
20-
"-DRCUTILS_NO_64_ATOMIC=ON",
20+
"-DRCUTILS_NO_64_ATOMIC=OFF",
2121
"-DRCUTILS_AVOID_DYNAMIC_ALLOCATION=ON"
2222
]
2323
},

libmicroros.mk

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -109,50 +109,7 @@ $(EXTENSIONS_DIR)/micro_ros_src/install: $(EXTENSIONS_DIR)/esp32_toolchain.cmake
109109
-DCMAKE_C_STANDARD=$(C_STANDARD) \
110110
-DUCLIENT_C_STANDARD=$(C_STANDARD);
111111

112-
patch_atomic:$(EXTENSIONS_DIR)/micro_ros_src/install
113-
# Workaround https://github.com/micro-ROS/micro_ros_espidf_component/issues/18
114-
ifeq ($(IDF_TARGET),$(filter $(IDF_TARGET),esp32s2 esp32c3 esp32c6))
115-
echo $(UROS_DIR)/atomic_workaround; \
116-
mkdir $(UROS_DIR)/atomic_workaround; cd $(UROS_DIR)/atomic_workaround; \
117-
$(X_AR) x $(UROS_DIR)/install/lib/librcutils.a; \
118-
$(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_fetch_add_8; \
119-
if [ $(IDF_VERSION_MAJOR) -ge 4 ] && [ $(IDF_VERSION_MINOR) -ge 3 ]; then \
120-
$(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_load_8; \
121-
$(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_store_8; \
122-
$(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_exchange_8; \
123-
fi; \
124-
if [ $(IDF_VERSION_MAJOR) -ge 4 ] && [ $(IDF_VERSION_MINOR) -ge 4 ]; then \
125-
$(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_load_8; \
126-
$(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_store_8; \
127-
fi; \
128-
if [ $(IDF_VERSION_MAJOR) -ge 5 ] && [ $(IDF_VERSION_MINOR) -ge 0 ]; then \
129-
$(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_load_8; \
130-
$(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_store_8; \
131-
$(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_exchange_8; \
132-
fi; \
133-
$(X_AR) rc -s librcutils.a *.obj; \
134-
cp -rf librcutils.a $(UROS_DIR)/install/lib/librcutils.a; \
135-
cd ..; \
136-
rm -rf $(UROS_DIR)/atomic_workaround;
137-
endif
138-
# ESP32-S3, ESP32-P4, ESP32: only need workaround in IDF 5.5
139-
ifeq ($(IDF_TARGET),$(filter $(IDF_TARGET),esp32s3 esp32p4 esp32))
140-
@if [ $(IDF_VERSION_MAJOR) -eq 5 ] && [ $(IDF_VERSION_MINOR) -eq 5 ]; then \
141-
echo $(UROS_DIR)/atomic_workaround; \
142-
mkdir $(UROS_DIR)/atomic_workaround; cd $(UROS_DIR)/atomic_workaround; \
143-
$(X_AR) x $(UROS_DIR)/install/lib/librcutils.a; \
144-
$(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_fetch_add_8; \
145-
$(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_load_8; \
146-
$(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_store_8; \
147-
$(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_exchange_8; \
148-
$(X_AR) rc -s librcutils.a *.obj; \
149-
cp -rf librcutils.a $(UROS_DIR)/install/lib/librcutils.a; \
150-
cd ..; \
151-
rm -rf $(UROS_DIR)/atomic_workaround; \
152-
fi
153-
endif
154-
155-
$(EXTENSIONS_DIR)/libmicroros.a: $(EXTENSIONS_DIR)/micro_ros_src/install patch_atomic
112+
$(EXTENSIONS_DIR)/libmicroros.a: $(EXTENSIONS_DIR)/micro_ros_src/install
156113
mkdir -p $(UROS_DIR)/libmicroros; cd $(UROS_DIR)/libmicroros; \
157114
for file in $$(find $(UROS_DIR)/install/lib/ -name '*.a'); do \
158115
folder=$$(echo $$file | sed -E "s/(.+)\/(.+).a/\2/"); \

0 commit comments

Comments
 (0)